Skip to content

Commit f42f829

Browse files
committed
Apply update.sh
1 parent e153968 commit f42f829

File tree

9 files changed

+198
-69
lines changed

9 files changed

+198
-69
lines changed

2.1/Dockerfile

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ ENV RUBY_DOWNLOAD_SHA256 fb2e454d7a5e5a39eb54db0ec666f53eeb6edc593d1d2b970ae4d15
1313
ENV RUBYGEMS_VERSION 2.6.6
1414

1515
# some of ruby's build scripts are written in ruby
16-
# we purge this later to make sure our final image uses what we just built
16+
# we purge system ruby later to make sure our final image uses what we just built
1717
RUN set -ex \
18+
\
1819
&& buildDeps=' \
1920
bison \
2021
libgdbm-dev \
@@ -23,20 +24,34 @@ RUN set -ex \
2324
&& apt-get update \
2425
&& apt-get install -y --no-install-recommends $buildDeps \
2526
&& rm -rf /var/lib/apt/lists/* \
26-
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
27+
\
28+
&& wget -O ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
2729
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
30+
\
2831
&& mkdir -p /usr/src/ruby \
2932
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
3033
&& rm ruby.tar.gz \
34+
\
3135
&& cd /usr/src/ruby \
32-
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
36+
\
37+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
38+
# warning: Insecure world writable dir
39+
&& { \
40+
echo '#define ENABLE_PATH_CHECK 0'; \
41+
echo; \
42+
cat file.c; \
43+
} > file.c.new \
44+
&& mv file.c.new file.c \
45+
\
3346
&& autoconf \
3447
&& ./configure --disable-install-doc \
3548
&& make -j"$(nproc)" \
3649
&& make install \
50+
\
3751
&& apt-get purge -y --auto-remove $buildDeps \
38-
&& gem update --system $RUBYGEMS_VERSION \
39-
&& rm -r /usr/src/ruby
52+
&& rm -r /usr/src/ruby \
53+
\
54+
&& gem update --system "$RUBYGEMS_VERSION"
4055

4156
ENV BUNDLER_VERSION 1.13.1
4257

2.1/alpine/Dockerfile

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ ENV RUBY_DOWNLOAD_SHA256 fb2e454d7a5e5a39eb54db0ec666f53eeb6edc593d1d2b970ae4d15
1313
ENV RUBYGEMS_VERSION 2.6.6
1414

1515
# some of ruby's build scripts are written in ruby
16-
# we purge this later to make sure our final image uses what we just built
16+
# we purge system ruby later to make sure our final image uses what we just built
17+
# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
1718
RUN set -ex \
19+
\
1820
&& apk add --no-cache --virtual .ruby-builddeps \
1921
autoconf \
2022
bison \
2123
bzip2 \
2224
bzip2-dev \
2325
ca-certificates \
2426
coreutils \
25-
curl \
2627
gcc \
2728
gdbm-dev \
2829
glib-dev \
@@ -35,25 +36,37 @@ RUN set -ex \
3536
ncurses-dev \
3637
openssl-dev \
3738
procps \
38-
# https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
3939
readline-dev \
4040
ruby \
41+
tar \
4142
yaml-dev \
4243
zlib-dev \
43-
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
44+
\
45+
&& wget -O ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
4446
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
45-
&& mkdir -p /usr/src \
46-
&& tar -xzf ruby.tar.gz -C /usr/src \
47-
&& mv "/usr/src/ruby-$RUBY_VERSION" /usr/src/ruby \
47+
\
48+
&& mkdir -p /usr/src/ruby \
49+
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
4850
&& rm ruby.tar.gz \
51+
\
4952
&& cd /usr/src/ruby \
50-
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
53+
\
54+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
55+
# warning: Insecure world writable dir
56+
&& { \
57+
echo '#define ENABLE_PATH_CHECK 0'; \
58+
echo; \
59+
cat file.c; \
60+
} > file.c.new \
61+
&& mv file.c.new file.c \
62+
\
5163
&& autoconf \
52-
# the configure script does not detect isnan/isinf as macros
64+
# the configure script does not detect isnan/isinf as macros
5365
&& ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
5466
./configure --disable-install-doc \
5567
&& make -j"$(getconf _NPROCESSORS_ONLN)" \
5668
&& make install \
69+
\
5770
&& runDeps="$( \
5871
scanelf --needed --nobanner --recursive /usr/local \
5972
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
@@ -64,15 +77,15 @@ RUN set -ex \
6477
&& apk add --virtual .ruby-rundeps $runDeps \
6578
bzip2 \
6679
ca-certificates \
67-
curl \
6880
libffi-dev \
6981
openssl-dev \
7082
yaml-dev \
7183
procps \
7284
zlib-dev \
7385
&& apk del .ruby-builddeps \
74-
&& gem update --system $RUBYGEMS_VERSION \
75-
&& rm -r /usr/src/ruby
86+
&& rm -r /usr/src/ruby \
87+
\
88+
&& gem update --system "$RUBYGEMS_VERSION"
7689

7790
ENV BUNDLER_VERSION 1.13.1
7891

2.1/slim/Dockerfile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \
55
bzip2 \
66
ca-certificates \
7-
curl \
87
libffi-dev \
98
libgdbm3 \
109
libssl-dev \
@@ -26,8 +25,9 @@ ENV RUBY_DOWNLOAD_SHA256 fb2e454d7a5e5a39eb54db0ec666f53eeb6edc593d1d2b970ae4d15
2625
ENV RUBYGEMS_VERSION 2.6.6
2726

2827
# some of ruby's build scripts are written in ruby
29-
# we purge this later to make sure our final image uses what we just built
28+
# we purge system ruby later to make sure our final image uses what we just built
3029
RUN set -ex \
30+
\
3131
&& buildDeps=' \
3232
autoconf \
3333
bison \
@@ -41,24 +41,39 @@ RUN set -ex \
4141
libxslt-dev \
4242
make \
4343
ruby \
44+
wget \
4445
' \
4546
&& apt-get update \
4647
&& apt-get install -y --no-install-recommends $buildDeps \
4748
&& rm -rf /var/lib/apt/lists/* \
48-
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
49+
\
50+
&& wget -O ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
4951
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
52+
\
5053
&& mkdir -p /usr/src/ruby \
5154
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
5255
&& rm ruby.tar.gz \
56+
\
5357
&& cd /usr/src/ruby \
54-
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
58+
\
59+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
60+
# warning: Insecure world writable dir
61+
&& { \
62+
echo '#define ENABLE_PATH_CHECK 0'; \
63+
echo; \
64+
cat file.c; \
65+
} > file.c.new \
66+
&& mv file.c.new file.c \
67+
\
5568
&& autoconf \
5669
&& ./configure --disable-install-doc \
5770
&& make -j"$(nproc)" \
5871
&& make install \
72+
\
5973
&& apt-get purge -y --auto-remove $buildDeps \
60-
&& gem update --system $RUBYGEMS_VERSION \
61-
&& rm -r /usr/src/ruby
74+
&& rm -r /usr/src/ruby \
75+
\
76+
&& gem update --system "$RUBYGEMS_VERSION"
6277

6378
ENV BUNDLER_VERSION 1.13.1
6479

2.2/Dockerfile

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ ENV RUBY_DOWNLOAD_SHA256 30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c
1313
ENV RUBYGEMS_VERSION 2.6.6
1414

1515
# some of ruby's build scripts are written in ruby
16-
# we purge this later to make sure our final image uses what we just built
16+
# we purge system ruby later to make sure our final image uses what we just built
1717
RUN set -ex \
18+
\
1819
&& buildDeps=' \
1920
bison \
2021
libgdbm-dev \
@@ -23,20 +24,34 @@ RUN set -ex \
2324
&& apt-get update \
2425
&& apt-get install -y --no-install-recommends $buildDeps \
2526
&& rm -rf /var/lib/apt/lists/* \
26-
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
27+
\
28+
&& wget -O ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
2729
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
30+
\
2831
&& mkdir -p /usr/src/ruby \
2932
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
3033
&& rm ruby.tar.gz \
34+
\
3135
&& cd /usr/src/ruby \
32-
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
36+
\
37+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
38+
# warning: Insecure world writable dir
39+
&& { \
40+
echo '#define ENABLE_PATH_CHECK 0'; \
41+
echo; \
42+
cat file.c; \
43+
} > file.c.new \
44+
&& mv file.c.new file.c \
45+
\
3346
&& autoconf \
3447
&& ./configure --disable-install-doc \
3548
&& make -j"$(nproc)" \
3649
&& make install \
50+
\
3751
&& apt-get purge -y --auto-remove $buildDeps \
38-
&& gem update --system $RUBYGEMS_VERSION \
39-
&& rm -r /usr/src/ruby
52+
&& rm -r /usr/src/ruby \
53+
\
54+
&& gem update --system "$RUBYGEMS_VERSION"
4055

4156
ENV BUNDLER_VERSION 1.13.1
4257

2.2/alpine/Dockerfile

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ ENV RUBY_DOWNLOAD_SHA256 30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c
1313
ENV RUBYGEMS_VERSION 2.6.6
1414

1515
# some of ruby's build scripts are written in ruby
16-
# we purge this later to make sure our final image uses what we just built
16+
# we purge system ruby later to make sure our final image uses what we just built
17+
# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
1718
RUN set -ex \
19+
\
1820
&& apk add --no-cache --virtual .ruby-builddeps \
1921
autoconf \
2022
bison \
2123
bzip2 \
2224
bzip2-dev \
2325
ca-certificates \
2426
coreutils \
25-
curl \
2627
gcc \
2728
gdbm-dev \
2829
glib-dev \
@@ -35,25 +36,37 @@ RUN set -ex \
3536
ncurses-dev \
3637
openssl-dev \
3738
procps \
38-
# https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
3939
readline-dev \
4040
ruby \
41+
tar \
4142
yaml-dev \
4243
zlib-dev \
43-
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
44+
\
45+
&& wget -O ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
4446
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
45-
&& mkdir -p /usr/src \
46-
&& tar -xzf ruby.tar.gz -C /usr/src \
47-
&& mv "/usr/src/ruby-$RUBY_VERSION" /usr/src/ruby \
47+
\
48+
&& mkdir -p /usr/src/ruby \
49+
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
4850
&& rm ruby.tar.gz \
51+
\
4952
&& cd /usr/src/ruby \
50-
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
53+
\
54+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
55+
# warning: Insecure world writable dir
56+
&& { \
57+
echo '#define ENABLE_PATH_CHECK 0'; \
58+
echo; \
59+
cat file.c; \
60+
} > file.c.new \
61+
&& mv file.c.new file.c \
62+
\
5163
&& autoconf \
52-
# the configure script does not detect isnan/isinf as macros
64+
# the configure script does not detect isnan/isinf as macros
5365
&& ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
5466
./configure --disable-install-doc \
5567
&& make -j"$(getconf _NPROCESSORS_ONLN)" \
5668
&& make install \
69+
\
5770
&& runDeps="$( \
5871
scanelf --needed --nobanner --recursive /usr/local \
5972
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
@@ -64,15 +77,15 @@ RUN set -ex \
6477
&& apk add --virtual .ruby-rundeps $runDeps \
6578
bzip2 \
6679
ca-certificates \
67-
curl \
6880
libffi-dev \
6981
openssl-dev \
7082
yaml-dev \
7183
procps \
7284
zlib-dev \
7385
&& apk del .ruby-builddeps \
74-
&& gem update --system $RUBYGEMS_VERSION \
75-
&& rm -r /usr/src/ruby
86+
&& rm -r /usr/src/ruby \
87+
\
88+
&& gem update --system "$RUBYGEMS_VERSION"
7689

7790
ENV BUNDLER_VERSION 1.13.1
7891

2.2/slim/Dockerfile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \
55
bzip2 \
66
ca-certificates \
7-
curl \
87
libffi-dev \
98
libgdbm3 \
109
libssl-dev \
@@ -26,8 +25,9 @@ ENV RUBY_DOWNLOAD_SHA256 30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c
2625
ENV RUBYGEMS_VERSION 2.6.6
2726

2827
# some of ruby's build scripts are written in ruby
29-
# we purge this later to make sure our final image uses what we just built
28+
# we purge system ruby later to make sure our final image uses what we just built
3029
RUN set -ex \
30+
\
3131
&& buildDeps=' \
3232
autoconf \
3333
bison \
@@ -41,24 +41,39 @@ RUN set -ex \
4141
libxslt-dev \
4242
make \
4343
ruby \
44+
wget \
4445
' \
4546
&& apt-get update \
4647
&& apt-get install -y --no-install-recommends $buildDeps \
4748
&& rm -rf /var/lib/apt/lists/* \
48-
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
49+
\
50+
&& wget -O ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
4951
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
52+
\
5053
&& mkdir -p /usr/src/ruby \
5154
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
5255
&& rm ruby.tar.gz \
56+
\
5357
&& cd /usr/src/ruby \
54-
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
58+
\
59+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
60+
# warning: Insecure world writable dir
61+
&& { \
62+
echo '#define ENABLE_PATH_CHECK 0'; \
63+
echo; \
64+
cat file.c; \
65+
} > file.c.new \
66+
&& mv file.c.new file.c \
67+
\
5568
&& autoconf \
5669
&& ./configure --disable-install-doc \
5770
&& make -j"$(nproc)" \
5871
&& make install \
72+
\
5973
&& apt-get purge -y --auto-remove $buildDeps \
60-
&& gem update --system $RUBYGEMS_VERSION \
61-
&& rm -r /usr/src/ruby
74+
&& rm -r /usr/src/ruby \
75+
\
76+
&& gem update --system "$RUBYGEMS_VERSION"
6277

6378
ENV BUNDLER_VERSION 1.13.1
6479

0 commit comments

Comments
 (0)