Skip to content

Commit ca09048

Browse files
authored
Merge pull request #287 from J0WI/buster
Add Debian Buster and remove Jessie
2 parents 04002dd + 3b76734 commit ca09048

File tree

9 files changed

+439
-10
lines changed

9 files changed

+439
-10
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ env:
55
- VERSION=2.7-rc VARIANT=buster
66
- VERSION=2.7-rc VARIANT=buster/slim
77
- VERSION=2.7-rc VARIANT=alpine3.10
8+
- VERSION=2.6 VARIANT=buster
9+
- VERSION=2.6 VARIANT=buster/slim
810
- VERSION=2.6 VARIANT=stretch
911
- VERSION=2.6 VARIANT=stretch/slim
1012
- VERSION=2.6 VARIANT=alpine3.10
1113
- VERSION=2.6 VARIANT=alpine3.9
14+
- VERSION=2.5 VARIANT=buster
15+
- VERSION=2.5 VARIANT=buster/slim
1216
- VERSION=2.5 VARIANT=stretch
1317
- VERSION=2.5 VARIANT=stretch/slim
1418
- VERSION=2.5 VARIANT=alpine3.10
1519
- VERSION=2.5 VARIANT=alpine3.9
20+
- VERSION=2.4 VARIANT=buster
21+
- VERSION=2.4 VARIANT=buster/slim
1622
- VERSION=2.4 VARIANT=stretch
1723
- VERSION=2.4 VARIANT=stretch/slim
18-
- VERSION=2.4 VARIANT=jessie
19-
- VERSION=2.4 VARIANT=jessie/slim
2024
- VERSION=2.4 VARIANT=alpine3.10
2125
- VERSION=2.4 VARIANT=alpine3.9
2226

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM buildpack-deps:jessie
1+
FROM buildpack-deps:buster
22

33
# skip installing gem documentation
44
RUN set -eux; \
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:jessie-slim
1+
FROM debian:buster-slim
22

33
RUN set -eux; \
44
apt-get update; \
@@ -39,6 +39,7 @@ RUN set -eux; \
3939
dpkg-dev \
4040
gcc \
4141
libbz2-dev \
42+
libgdbm-compat-dev \
4243
libgdbm-dev \
4344
libglib2.0-dev \
4445
libncurses-dev \

2.5/buster/Dockerfile

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
FROM buildpack-deps:buster
2+
3+
# skip installing gem documentation
4+
RUN set -eux; \
5+
mkdir -p /usr/local/etc; \
6+
{ \
7+
echo 'install: --no-document'; \
8+
echo 'update: --no-document'; \
9+
} >> /usr/local/etc/gemrc
10+
11+
ENV RUBY_MAJOR 2.5
12+
ENV RUBY_VERSION 2.5.5
13+
ENV RUBY_DOWNLOAD_SHA256 9bf6370aaa82c284f193264cc7ca56f202171c32367deceb3599a4f354175d7d
14+
ENV RUBYGEMS_VERSION 3.0.3
15+
16+
# some of ruby's build scripts are written in ruby
17+
# we purge system ruby later to make sure our final image uses what we just built
18+
RUN set -eux; \
19+
\
20+
savedAptMark="$(apt-mark showmanual)"; \
21+
apt-get update; \
22+
apt-get install -y --no-install-recommends \
23+
bison \
24+
dpkg-dev \
25+
libgdbm-dev \
26+
ruby \
27+
; \
28+
rm -rf /var/lib/apt/lists/*; \
29+
\
30+
wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \
31+
echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \
32+
\
33+
mkdir -p /usr/src/ruby; \
34+
tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \
35+
rm ruby.tar.xz; \
36+
\
37+
cd /usr/src/ruby; \
38+
\
39+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
40+
# warning: Insecure world writable dir
41+
{ \
42+
echo '#define ENABLE_PATH_CHECK 0'; \
43+
echo; \
44+
cat file.c; \
45+
} > file.c.new; \
46+
mv file.c.new file.c; \
47+
\
48+
autoconf; \
49+
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
50+
./configure \
51+
--build="$gnuArch" \
52+
--disable-install-doc \
53+
--enable-shared \
54+
; \
55+
make -j "$(nproc)"; \
56+
make install; \
57+
\
58+
apt-mark auto '.*' > /dev/null; \
59+
apt-mark manual $savedAptMark > /dev/null; \
60+
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
61+
| awk '/=>/ { print $(NF-1) }' \
62+
| sort -u \
63+
| xargs -r dpkg-query --search \
64+
| cut -d: -f1 \
65+
| sort -u \
66+
| xargs -r apt-mark manual \
67+
; \
68+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
69+
\
70+
cd /; \
71+
rm -r /usr/src/ruby; \
72+
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
73+
ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))'; \
74+
gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/; \
75+
# verify we have no "ruby" packages installed
76+
! dpkg -l | grep -i ruby; \
77+
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
78+
# rough smoke test
79+
ruby --version; \
80+
gem --version; \
81+
bundle --version
82+
83+
# install things globally, for great justice
84+
# and don't create ".bundle" in all our apps
85+
ENV GEM_HOME /usr/local/bundle
86+
ENV BUNDLE_PATH__SYSTEM=true \
87+
BUNDLE_SILENCE_ROOT_WARNING=1 \
88+
BUNDLE_APP_CONFIG="$GEM_HOME"
89+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
90+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
91+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
92+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
93+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
94+
95+
CMD [ "irb" ]

2.5/buster/slim/Dockerfile

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
FROM debian:buster-slim
2+
3+
RUN set -eux; \
4+
apt-get update; \
5+
apt-get install -y --no-install-recommends \
6+
bzip2 \
7+
ca-certificates \
8+
libffi-dev \
9+
libgmp-dev \
10+
libssl-dev \
11+
libyaml-dev \
12+
procps \
13+
zlib1g-dev \
14+
; \
15+
rm -rf /var/lib/apt/lists/*
16+
17+
# skip installing gem documentation
18+
RUN set -eux; \
19+
mkdir -p /usr/local/etc; \
20+
{ \
21+
echo 'install: --no-document'; \
22+
echo 'update: --no-document'; \
23+
} >> /usr/local/etc/gemrc
24+
25+
ENV RUBY_MAJOR 2.5
26+
ENV RUBY_VERSION 2.5.5
27+
ENV RUBY_DOWNLOAD_SHA256 9bf6370aaa82c284f193264cc7ca56f202171c32367deceb3599a4f354175d7d
28+
ENV RUBYGEMS_VERSION 3.0.3
29+
30+
# some of ruby's build scripts are written in ruby
31+
# we purge system ruby later to make sure our final image uses what we just built
32+
RUN set -eux; \
33+
\
34+
savedAptMark="$(apt-mark showmanual)"; \
35+
apt-get update; \
36+
apt-get install -y --no-install-recommends \
37+
autoconf \
38+
bison \
39+
dpkg-dev \
40+
gcc \
41+
libbz2-dev \
42+
libgdbm-compat-dev \
43+
libgdbm-dev \
44+
libglib2.0-dev \
45+
libncurses-dev \
46+
libreadline-dev \
47+
libxml2-dev \
48+
libxslt-dev \
49+
make \
50+
ruby \
51+
wget \
52+
xz-utils \
53+
; \
54+
rm -rf /var/lib/apt/lists/*; \
55+
\
56+
wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \
57+
echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \
58+
\
59+
mkdir -p /usr/src/ruby; \
60+
tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \
61+
rm ruby.tar.xz; \
62+
\
63+
cd /usr/src/ruby; \
64+
\
65+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
66+
# warning: Insecure world writable dir
67+
{ \
68+
echo '#define ENABLE_PATH_CHECK 0'; \
69+
echo; \
70+
cat file.c; \
71+
} > file.c.new; \
72+
mv file.c.new file.c; \
73+
\
74+
autoconf; \
75+
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
76+
./configure \
77+
--build="$gnuArch" \
78+
--disable-install-doc \
79+
--enable-shared \
80+
; \
81+
make -j "$(nproc)"; \
82+
make install; \
83+
\
84+
apt-mark auto '.*' > /dev/null; \
85+
apt-mark manual $savedAptMark > /dev/null; \
86+
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
87+
| awk '/=>/ { print $(NF-1) }' \
88+
| sort -u \
89+
| xargs -r dpkg-query --search \
90+
| cut -d: -f1 \
91+
| sort -u \
92+
| xargs -r apt-mark manual \
93+
; \
94+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
95+
\
96+
cd /; \
97+
rm -r /usr/src/ruby; \
98+
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
99+
ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))'; \
100+
gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/; \
101+
# verify we have no "ruby" packages installed
102+
! dpkg -l | grep -i ruby; \
103+
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
104+
# rough smoke test
105+
ruby --version; \
106+
gem --version; \
107+
bundle --version
108+
109+
# install things globally, for great justice
110+
# and don't create ".bundle" in all our apps
111+
ENV GEM_HOME /usr/local/bundle
112+
ENV BUNDLE_PATH__SYSTEM=true \
113+
BUNDLE_SILENCE_ROOT_WARNING=1 \
114+
BUNDLE_APP_CONFIG="$GEM_HOME"
115+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
116+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
117+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
118+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
119+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
120+
121+
CMD [ "irb" ]

2.6/buster/Dockerfile

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
FROM buildpack-deps:buster
2+
3+
# skip installing gem documentation
4+
RUN set -eux; \
5+
mkdir -p /usr/local/etc; \
6+
{ \
7+
echo 'install: --no-document'; \
8+
echo 'update: --no-document'; \
9+
} >> /usr/local/etc/gemrc
10+
11+
ENV RUBY_MAJOR 2.6
12+
ENV RUBY_VERSION 2.6.3
13+
ENV RUBY_DOWNLOAD_SHA256 11a83f85c03d3f0fc9b8a9b6cad1b2674f26c5aaa43ba858d4b0fcc2b54171e1
14+
15+
# some of ruby's build scripts are written in ruby
16+
# we purge system ruby later to make sure our final image uses what we just built
17+
RUN set -eux; \
18+
\
19+
savedAptMark="$(apt-mark showmanual)"; \
20+
apt-get update; \
21+
apt-get install -y --no-install-recommends \
22+
bison \
23+
dpkg-dev \
24+
libgdbm-dev \
25+
ruby \
26+
; \
27+
rm -rf /var/lib/apt/lists/*; \
28+
\
29+
wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \
30+
echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \
31+
\
32+
mkdir -p /usr/src/ruby; \
33+
tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \
34+
rm ruby.tar.xz; \
35+
\
36+
cd /usr/src/ruby; \
37+
\
38+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
39+
# warning: Insecure world writable dir
40+
{ \
41+
echo '#define ENABLE_PATH_CHECK 0'; \
42+
echo; \
43+
cat file.c; \
44+
} > file.c.new; \
45+
mv file.c.new file.c; \
46+
\
47+
autoconf; \
48+
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
49+
./configure \
50+
--build="$gnuArch" \
51+
--disable-install-doc \
52+
--enable-shared \
53+
; \
54+
make -j "$(nproc)"; \
55+
make install; \
56+
\
57+
apt-mark auto '.*' > /dev/null; \
58+
apt-mark manual $savedAptMark > /dev/null; \
59+
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
60+
| awk '/=>/ { print $(NF-1) }' \
61+
| sort -u \
62+
| xargs -r dpkg-query --search \
63+
| cut -d: -f1 \
64+
| sort -u \
65+
| xargs -r apt-mark manual \
66+
; \
67+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
68+
\
69+
cd /; \
70+
rm -r /usr/src/ruby; \
71+
# verify we have no "ruby" packages installed
72+
! dpkg -l | grep -i ruby; \
73+
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
74+
# rough smoke test
75+
ruby --version; \
76+
gem --version; \
77+
bundle --version
78+
79+
# install things globally, for great justice
80+
# and don't create ".bundle" in all our apps
81+
ENV GEM_HOME /usr/local/bundle
82+
ENV BUNDLE_PATH__SYSTEM=true \
83+
BUNDLE_SILENCE_ROOT_WARNING=1 \
84+
BUNDLE_APP_CONFIG="$GEM_HOME"
85+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
86+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
87+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
88+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
89+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
90+
91+
CMD [ "irb" ]

0 commit comments

Comments
 (0)