Skip to content

Commit 5053e75

Browse files
committed
Add "buster" variants
For the slim variants, I had to remove libgdbm3, [1] says > Package not available in this suite. 1: https://packages.debian.org/buster/libgdbm3
1 parent 93cb6e0 commit 5053e75

File tree

10 files changed

+727
-1
lines changed

10 files changed

+727
-1
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,26 @@ language: bash
22
services: docker
33

44
env:
5+
- VERSION=2.6-rc VARIANT=buster
6+
- VERSION=2.6-rc VARIANT=buster/slim
57
- VERSION=2.6-rc VARIANT=stretch
68
- VERSION=2.6-rc VARIANT=stretch/slim
79
- VERSION=2.6-rc VARIANT=alpine3.7
10+
- VERSION=2.5 VARIANT=buster
11+
- VERSION=2.5 VARIANT=buster/slim
812
- VERSION=2.5 VARIANT=stretch
913
- VERSION=2.5 VARIANT=stretch/slim
1014
- VERSION=2.5 VARIANT=alpine3.7
15+
- VERSION=2.4 VARIANT=buster
16+
- VERSION=2.4 VARIANT=buster/slim
1117
- VERSION=2.4 VARIANT=stretch
1218
- VERSION=2.4 VARIANT=stretch/slim
1319
- VERSION=2.4 VARIANT=jessie
1420
- VERSION=2.4 VARIANT=jessie/slim
1521
- VERSION=2.4 VARIANT=alpine3.7
1622
- VERSION=2.4 VARIANT=alpine3.6
23+
- VERSION=2.3 VARIANT=buster
24+
- VERSION=2.3 VARIANT=buster/slim
1725
- VERSION=2.3 VARIANT=stretch
1826
- VERSION=2.3 VARIANT=stretch/slim
1927
- VERSION=2.3 VARIANT=jessie

2.3/buster/Dockerfile

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
FROM buildpack-deps:buster
2+
3+
# skip installing gem documentation
4+
RUN mkdir -p /usr/local/etc \
5+
&& { \
6+
echo 'install: --no-document'; \
7+
echo 'update: --no-document'; \
8+
} >> /usr/local/etc/gemrc
9+
10+
ENV RUBY_MAJOR 2.3
11+
ENV RUBY_VERSION 2.3.7
12+
ENV RUBY_DOWNLOAD_SHA256 c61f8f2b9d3ffff5567e186421fa191f0d5e7c2b189b426bb84498825d548edb
13+
ENV RUBYGEMS_VERSION 2.7.7
14+
ENV BUNDLER_VERSION 1.16.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 -ex \
19+
\
20+
&& buildDeps=' \
21+
bison \
22+
dpkg-dev \
23+
libgdbm-dev \
24+
# ruby 2.3 on stretch can only support libssl1.0-dev (libssl dev from buildpack-deps is 1.1.x)
25+
libssl1.0-dev \
26+
ruby \
27+
' \
28+
&& apt-get update \
29+
&& apt-get install -y --no-install-recommends $buildDeps \
30+
&& rm -rf /var/lib/apt/lists/* \
31+
\
32+
&& wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
33+
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
34+
\
35+
&& mkdir -p /usr/src/ruby \
36+
&& tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
37+
&& rm ruby.tar.xz \
38+
\
39+
&& cd /usr/src/ruby \
40+
\
41+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
42+
# warning: Insecure world writable dir
43+
&& { \
44+
echo '#define ENABLE_PATH_CHECK 0'; \
45+
echo; \
46+
cat file.c; \
47+
} > file.c.new \
48+
&& mv file.c.new file.c \
49+
\
50+
&& autoconf \
51+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
52+
&& ./configure \
53+
--build="$gnuArch" \
54+
--disable-install-doc \
55+
--enable-shared \
56+
&& make -j "$(nproc)" \
57+
&& make install \
58+
\
59+
&& apt-get purge -y --auto-remove $buildDeps \
60+
&& cd / \
61+
&& rm -r /usr/src/ruby \
62+
\
63+
&& gem update --system "$RUBYGEMS_VERSION" \
64+
&& gem install bundler --version "$BUNDLER_VERSION" --force \
65+
&& rm -r /root/.gem/
66+
67+
# install things globally, for great justice
68+
# and don't create ".bundle" in all our apps
69+
ENV GEM_HOME /usr/local/bundle
70+
ENV BUNDLE_PATH="$GEM_HOME" \
71+
BUNDLE_SILENCE_ROOT_WARNING=1 \
72+
BUNDLE_APP_CONFIG="$GEM_HOME"
73+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
74+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
75+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
76+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
77+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
78+
79+
CMD [ "irb" ]

2.3/buster/slim/Dockerfile

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
FROM debian:buster
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends \
5+
bzip2 \
6+
ca-certificates \
7+
libffi-dev \
8+
libssl1.0-dev \
9+
libyaml-dev \
10+
procps \
11+
zlib1g-dev \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# skip installing gem documentation
15+
RUN mkdir -p /usr/local/etc \
16+
&& { \
17+
echo 'install: --no-document'; \
18+
echo 'update: --no-document'; \
19+
} >> /usr/local/etc/gemrc
20+
21+
ENV RUBY_MAJOR 2.3
22+
ENV RUBY_VERSION 2.3.7
23+
ENV RUBY_DOWNLOAD_SHA256 c61f8f2b9d3ffff5567e186421fa191f0d5e7c2b189b426bb84498825d548edb
24+
ENV RUBYGEMS_VERSION 2.7.7
25+
ENV BUNDLER_VERSION 1.16.3
26+
27+
# some of ruby's build scripts are written in ruby
28+
# we purge system ruby later to make sure our final image uses what we just built
29+
RUN set -ex \
30+
\
31+
&& buildDeps=' \
32+
autoconf \
33+
bison \
34+
dpkg-dev \
35+
gcc \
36+
libbz2-dev \
37+
libgdbm-dev \
38+
libglib2.0-dev \
39+
libncurses-dev \
40+
libreadline-dev \
41+
libxml2-dev \
42+
libxslt-dev \
43+
make \
44+
ruby \
45+
wget \
46+
xz-utils \
47+
' \
48+
&& apt-get update \
49+
&& apt-get install -y --no-install-recommends $buildDeps \
50+
&& rm -rf /var/lib/apt/lists/* \
51+
\
52+
&& wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
53+
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
54+
\
55+
&& mkdir -p /usr/src/ruby \
56+
&& tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
57+
&& rm ruby.tar.xz \
58+
\
59+
&& cd /usr/src/ruby \
60+
\
61+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
62+
# warning: Insecure world writable dir
63+
&& { \
64+
echo '#define ENABLE_PATH_CHECK 0'; \
65+
echo; \
66+
cat file.c; \
67+
} > file.c.new \
68+
&& mv file.c.new file.c \
69+
\
70+
&& autoconf \
71+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
72+
&& ./configure \
73+
--build="$gnuArch" \
74+
--disable-install-doc \
75+
--enable-shared \
76+
&& make -j "$(nproc)" \
77+
&& make install \
78+
\
79+
&& dpkg-query --show --showformat '${package}\n' \
80+
| grep -P '^libreadline\d+$' \
81+
| xargs apt-mark manual \
82+
&& apt-get purge -y --auto-remove $buildDeps \
83+
&& cd / \
84+
&& rm -r /usr/src/ruby \
85+
\
86+
&& gem update --system "$RUBYGEMS_VERSION" \
87+
&& gem install bundler --version "$BUNDLER_VERSION" --force \
88+
&& rm -r /root/.gem/
89+
90+
# install things globally, for great justice
91+
# and don't create ".bundle" in all our apps
92+
ENV GEM_HOME /usr/local/bundle
93+
ENV BUNDLE_PATH="$GEM_HOME" \
94+
BUNDLE_SILENCE_ROOT_WARNING=1 \
95+
BUNDLE_APP_CONFIG="$GEM_HOME"
96+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
97+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
98+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
99+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
100+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
101+
102+
CMD [ "irb" ]

2.4/buster/Dockerfile

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM buildpack-deps:buster
2+
3+
# skip installing gem documentation
4+
RUN mkdir -p /usr/local/etc \
5+
&& { \
6+
echo 'install: --no-document'; \
7+
echo 'update: --no-document'; \
8+
} >> /usr/local/etc/gemrc
9+
10+
ENV RUBY_MAJOR 2.4
11+
ENV RUBY_VERSION 2.4.4
12+
ENV RUBY_DOWNLOAD_SHA256 1d0034071d675193ca769f64c91827e5f54cb3a7962316a41d5217c7bc6949f0
13+
ENV RUBYGEMS_VERSION 2.7.7
14+
ENV BUNDLER_VERSION 1.16.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 -ex \
19+
\
20+
&& buildDeps=' \
21+
bison \
22+
dpkg-dev \
23+
libgdbm-dev \
24+
ruby \
25+
' \
26+
&& apt-get update \
27+
&& apt-get install -y --no-install-recommends $buildDeps \
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 -c - \
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+
&& make -j "$(nproc)" \
55+
&& make install \
56+
\
57+
&& apt-get purge -y --auto-remove $buildDeps \
58+
&& cd / \
59+
&& rm -r /usr/src/ruby \
60+
\
61+
&& gem update --system "$RUBYGEMS_VERSION" \
62+
&& gem install bundler --version "$BUNDLER_VERSION" --force \
63+
&& rm -r /root/.gem/
64+
65+
# install things globally, for great justice
66+
# and don't create ".bundle" in all our apps
67+
ENV GEM_HOME /usr/local/bundle
68+
ENV BUNDLE_PATH="$GEM_HOME" \
69+
BUNDLE_SILENCE_ROOT_WARNING=1 \
70+
BUNDLE_APP_CONFIG="$GEM_HOME"
71+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
72+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
73+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
74+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
75+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
76+
77+
CMD [ "irb" ]

2.4/buster/slim/Dockerfile

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
FROM debian:buster
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends \
5+
bzip2 \
6+
ca-certificates \
7+
libffi-dev \
8+
libssl-dev \
9+
libyaml-dev \
10+
procps \
11+
zlib1g-dev \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# skip installing gem documentation
15+
RUN mkdir -p /usr/local/etc \
16+
&& { \
17+
echo 'install: --no-document'; \
18+
echo 'update: --no-document'; \
19+
} >> /usr/local/etc/gemrc
20+
21+
ENV RUBY_MAJOR 2.4
22+
ENV RUBY_VERSION 2.4.4
23+
ENV RUBY_DOWNLOAD_SHA256 1d0034071d675193ca769f64c91827e5f54cb3a7962316a41d5217c7bc6949f0
24+
ENV RUBYGEMS_VERSION 2.7.7
25+
ENV BUNDLER_VERSION 1.16.3
26+
27+
# some of ruby's build scripts are written in ruby
28+
# we purge system ruby later to make sure our final image uses what we just built
29+
RUN set -ex \
30+
\
31+
&& buildDeps=' \
32+
autoconf \
33+
bison \
34+
dpkg-dev \
35+
gcc \
36+
libbz2-dev \
37+
libgdbm-dev \
38+
libglib2.0-dev \
39+
libncurses-dev \
40+
libreadline-dev \
41+
libxml2-dev \
42+
libxslt-dev \
43+
make \
44+
ruby \
45+
wget \
46+
xz-utils \
47+
' \
48+
&& apt-get update \
49+
&& apt-get install -y --no-install-recommends $buildDeps \
50+
&& rm -rf /var/lib/apt/lists/* \
51+
\
52+
&& wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
53+
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
54+
\
55+
&& mkdir -p /usr/src/ruby \
56+
&& tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
57+
&& rm ruby.tar.xz \
58+
\
59+
&& cd /usr/src/ruby \
60+
\
61+
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
62+
# warning: Insecure world writable dir
63+
&& { \
64+
echo '#define ENABLE_PATH_CHECK 0'; \
65+
echo; \
66+
cat file.c; \
67+
} > file.c.new \
68+
&& mv file.c.new file.c \
69+
\
70+
&& autoconf \
71+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
72+
&& ./configure \
73+
--build="$gnuArch" \
74+
--disable-install-doc \
75+
--enable-shared \
76+
&& make -j "$(nproc)" \
77+
&& make install \
78+
\
79+
&& dpkg-query --show --showformat '${package}\n' \
80+
| grep -P '^libreadline\d+$' \
81+
| xargs apt-mark manual \
82+
&& apt-get purge -y --auto-remove $buildDeps \
83+
&& cd / \
84+
&& rm -r /usr/src/ruby \
85+
\
86+
&& gem update --system "$RUBYGEMS_VERSION" \
87+
&& gem install bundler --version "$BUNDLER_VERSION" --force \
88+
&& rm -r /root/.gem/
89+
90+
# install things globally, for great justice
91+
# and don't create ".bundle" in all our apps
92+
ENV GEM_HOME /usr/local/bundle
93+
ENV BUNDLE_PATH="$GEM_HOME" \
94+
BUNDLE_SILENCE_ROOT_WARNING=1 \
95+
BUNDLE_APP_CONFIG="$GEM_HOME"
96+
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
97+
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
98+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
99+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
100+
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)
101+
102+
CMD [ "irb" ]

0 commit comments

Comments
 (0)