Merge branch 'hp-add-ubuntu-22.04' into 'master'

Add Ubuntu 22.04 build image

See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/583

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: Hossein Pursultani <hpursultani@gitlab.com>
This commit is contained in:
Balasankar 'Balu' C 2022-09-28 05:54:41 +00:00
commit fc0ad007ec
2 changed files with 43 additions and 0 deletions

View file

@ -67,6 +67,9 @@ omnibus-gitlab-xenial:
omnibus-gitlab-focal: omnibus-gitlab-focal:
extends: .build_and_deploy extends: .build_and_deploy
omnibus-gitlab-jammy:
extends: .build_and_deploy
omnibus-gitlab-amazonlinux2: omnibus-gitlab-amazonlinux2:
extends: .build_and_deploy extends: .build_and_deploy

View file

@ -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