diff --git a/.gitlab/ci/custom.images.yml b/.gitlab/ci/custom.images.yml index ec303c8..4eb2e03 100644 --- a/.gitlab/ci/custom.images.yml +++ b/.gitlab/ci/custom.images.yml @@ -67,6 +67,9 @@ omnibus-gitlab-xenial: omnibus-gitlab-focal: extends: .build_and_deploy +omnibus-gitlab-jammy: + extends: .build_and_deploy + omnibus-gitlab-amazonlinux2: extends: .build_and_deploy diff --git a/Dockerfile.omnibus-gitlab-jammy b/Dockerfile.omnibus-gitlab-jammy new file mode 100644 index 0000000..87d74e6 --- /dev/null +++ b/Dockerfile.omnibus-gitlab-jammy @@ -0,0 +1,40 @@ +FROM ubuntu:22.04 + +RUN apt-get update -q \ + && apt-get install -y g++ gcc git make curl zlib1g-dev libssl-dev locales \ + && apt-get autoremove -yq \ + && apt-get clean -yqq \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 + +ENV RUBY_VERSION 2.7.5 + +# Ruby 2.7.x and 3.0.x can not build against OpenSSL 3.0 which is the +# version with Ubuntu 22.04. This workaround installs OpenSSL 1.1.1q +# from source and builds. +# +# For further details see: +# - https://bugs.ruby-lang.org/issues/18658 +# - https://github.com/rbenv/ruby-build/pull/1974 + +RUN curl -fsSL "https://www.openssl.org/source/openssl-1.1.1q.tar.gz" | tar -xzC /tmp \ + && cd /tmp/openssl-1.1.1q \ + && ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib \ + && make \ + && make install \ + && cd / \ + && rm -rf /tmp/openssl-1.1.1q /usr/local/openssl/certs \ + && ln -s /etc/ssl/certs /usr/local/openssl/ + +RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-${RUBY_VERSION}.tar.gz" \ + | tar -xzC /tmp \ + && cd "/tmp/ruby-${RUBY_VERSION}" \ + && ./configure --disable-install-rdoc --disable-install-doc --disable-install-capi --with-openssl-dir=/usr/local/openssl \ + && make \ + && make install \ + && cd / \ + && rm -rf "/tmp/ruby-${RUBY_VERSION}" \ + && gem install bundler --no-document --version 2.2.33