FROM opensuse/leap:15.4 as builder-base RUN zypper -q -n --gpg-auto-import-keys update RUN zypper -q -n in -t pattern \ devel_basis \ devel_perl RUN zypper -q -n install \ curl \ gcc \ gcc-c++ \ git \ glibc-i18ndata \ glibc-locale \ gzip \ hostname \ libopenssl-devel \ make \ zlib-devel RUN zypper clean -a ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 ENV LANGUAGE C RUN localedef -i C -f UTF-8 C.UTF-8 FROM builder-base as builder-ruby RUN zypper -q -n install \ readline-devel ENV RUBY_VERSION 2.7.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-${RUBY_VERSION}.tar.gz" \ | tar -xzC /tmp WORKDIR "/tmp/ruby-${RUBY_VERSION}" RUN ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi RUN make RUN make install WORKDIR / RUN rm -rf "/tmp/ruby-${RUBY_VERSION}" RUN gem install bundler --no-document --version 2.2.33 FROM builder-base COPY --from=builder-ruby /usr/local /usr/local