forked from bobtfish/puppet-omnibus
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.jammy
51 lines (44 loc) · 2.31 KB
/
Dockerfile.jammy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM docker-dev.yelpcorp.com/jammy_yelp:latest
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install \
autoconf bison build-essential curl fakeroot gawk git-core libffi-dev \
libffi7 libgdbm-dev libncurses5-dev libpcre3-dev \
libreadline-dev libsqlite3-dev libxml2-dev libxslt1-dev \
pkg-config ruby screen sudo wget zlib1g zlib1g-dev && \
apt-get clean
RUN rm -f /bin/sh && \
ln -s /bin/bash /bin/sh && \
touch "/etc/default/puppet" && \
mkdir -p /opt /package /etc/puppet /var/lib/puppet /var/cache/omnibus && \
echo 'gem: --no-document' > /etc/gemrc && \
echo 'install: --no-ri --no-rdoc' >> /etc/gemrc && \
echo 'update: --no-ri --no-rdoc' >> /etc/gemrc && \
cp /etc/gemrc /.gemrc && \
cp /etc/gemrc /root/.gemrc && \
cp /etc/gemrc /package/.gemrc
ADD vendor/ruby-build-20211203.tar.gz /tmp
# PEREL-2701: Download and install libssl-dev 1.1 from impish, since jammy
# moves to 3.0 and Ruby doesn't support that at all yet. Jammy does include a
# runtime edition of 1.1 in libssl1.1 though, just doesn't have development headers
#
# Admittedly, this is a hack, and hopefully the situation here is better later
# on in jammy's release.
#
# UPDATE: libssl1.1 runtime was removed from the jammy package archive before release
# so we now also need to pull in libssl1.1 from impish
RUN wget https://mirrors.edge.kernel.org/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
RUN wget https://mirrors.edge.kernel.org/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
RUN dpkg -i libssl-dev_1.1.1f-1ubuntu2_amd64.deb
RUN mkdir -p /opt/puppet-omnibus/embedded && \
export MAKE_OPTS="-j3 -s" && \
export RUBY_CFLAGS=-Os && \
export RUBY_BUILD_CACHE_PATH=/tmp && \
export RUBY_CONFIGURE_OPTS="--without-gdbm --without-dbm \
--with-readline-dir=/usr/lib/x86_64-linux-gnu --with-openssl-dir=/usr/lib/x86_64-linux-gnu \
--disable-install-doc --without-tcl --without-tk" && \
/tmp/ruby-build-20211203/bin/ruby-build -p 2.4.10 /opt/puppet-omnibus/embedded
RUN /opt/puppet-omnibus/embedded/bin/gem install rubygems-update -v '<3' && \
/opt/puppet-omnibus/embedded/bin/update_rubygems && \
rm -rf /opt/puppet-omnibus/embedded/share/*
ADD facter.patch /tmp