mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Merge branch 'add-amazon2022-image' into 'master'
Add amazon linux 2022 image See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/594 Merged-by: DJ Mountney <dj@gitlab.com> Approved-by: Andrew Patterson <apatterson@gitlab.com> Approved-by: DJ Mountney <dj@gitlab.com> Reviewed-by: Balasankar 'Balu' C <balasankar@gitlab.com> Reviewed-by: DJ Mountney <dj@gitlab.com> Co-authored-by: Dmitry Makovey <dmakovey@gitlab.com>
This commit is contained in:
commit
b2450136ba
2 changed files with 67 additions and 0 deletions
|
|
@ -76,6 +76,9 @@ omnibus-gitlab-jammy:
|
|||
omnibus-gitlab-amazonlinux2:
|
||||
extends: .build_and_deploy
|
||||
|
||||
omnibus-gitlab-amazonlinux2022:
|
||||
extends: .build_and_deploy
|
||||
|
||||
omnibus-gitlab-depscan:
|
||||
extends: .build_and_deploy
|
||||
|
||||
|
|
|
|||
64
Dockerfile.omnibus-gitlab-amazonlinux2022
Normal file
64
Dockerfile.omnibus-gitlab-amazonlinux2022
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
FROM amazonlinux:2022 as builder-base
|
||||
|
||||
RUN yum update -y -q \
|
||||
&& yum groupinstall -y "Development Tools" \
|
||||
&& yum install -y --allowerasing \
|
||||
gcc gcc-c++ git make curl zlib-devel glibc-locale-source hostname \
|
||||
&& yum clean all
|
||||
ENV LANG C.UTF-8
|
||||
ENV LC_ALL C.UTF-8
|
||||
RUN localedef -c -f UTF-8 -i C C.UTF-8
|
||||
|
||||
|
||||
FROM builder-base as builder-openssl
|
||||
|
||||
RUN yum install -y perl-FindBin
|
||||
|
||||
ENV OPENSSL_VERSION 1.1.1q
|
||||
RUN curl -fsSL "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" | tar -xzC /tmp
|
||||
WORKDIR /tmp/openssl-${OPENSSL_VERSION}
|
||||
RUN ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib
|
||||
RUN make
|
||||
ENV DESTDIR=/tmp/openssl-install
|
||||
RUN mkdir -p ${DESTDIR}
|
||||
RUN make DESTDIR=${DESTDIR} INSTALL_PREFIX=${DESTDIR} install
|
||||
WORKDIR /
|
||||
RUN rm -rf ${DESTDIR}/usr/local/openssl/certs \
|
||||
&& ln -s /etc/ssl/certs ${DESTDIR}/usr/local/openssl/
|
||||
|
||||
FROM builder-base as builder-ruby
|
||||
|
||||
COPY --from=builder-openssl /tmp/openssl-install /
|
||||
|
||||
RUN yum install -y gdbm-devel 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 --with-openssl-dir=/usr/local/openssl
|
||||
RUN make
|
||||
RUN mkdir /tmp/ruby-install
|
||||
RUN make DESTDIR=/tmp/ruby-install install
|
||||
RUN mkdir -p /tmp/ruby-install/etc/ld.so.conf.d/ \
|
||||
&& echo "/usr/local/openssl/lib" > /tmp/ruby-install/etc/ld.so.conf.d/openssl-local.conf
|
||||
RUN mkdir -p /tmp/ruby-install/etc/profile.d \
|
||||
&& echo "PATH=\${PATH}:/usr/local/openssl/bin" > /tmp/ruby-install/etc/profile.d/openssl-local.sh
|
||||
WORKDIR /
|
||||
|
||||
FROM builder-base as builder-assemble
|
||||
|
||||
COPY --from=builder-openssl /tmp/openssl-install/ /
|
||||
RUN rm -rf /usr/local/openssl/certs \
|
||||
&& ln -sf /etc/ssl/certs /usr/local/openssl/certs \
|
||||
&& ln -sf /etc/ssl/cert.pem /usr/local/openssl/cert.pem
|
||||
|
||||
COPY --from=builder-ruby /tmp/ruby-install/ /
|
||||
RUN ldconfig -f /etc/ld.so.conf
|
||||
ENV PATH=${PATH}:/usr/local/openssl/bin
|
||||
RUN gem install bundler --no-document --version 2.2.33
|
||||
|
||||
FROM builder-base
|
||||
ENV PATH=${PATH}:/usr/local/openssl/bin
|
||||
COPY --from=builder-assemble / /
|
||||
Loading…
Add table
Add a link
Reference in a new issue