Skip to content

Commit 69082ed

Browse files
committed
Tweak a few more things
1 parent 084ed67 commit 69082ed

File tree

4 files changed

+196
-154
lines changed

4 files changed

+196
-154
lines changed

.travis.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ install:
1010

1111
before_script:
1212
- env | sort
13+
- wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash
1314
- cd "$VERSION"
1415
- image="$(awk '$1 == "FROM" { print $2; exit }' passenger/Dockerfile)"
1516

1617
script:
17-
- travis_retry docker build -t "$image" .
18-
- ~/official-images/test/run.sh "$image"
19-
- travis_retry docker build -t "$image-passenger" passenger
20-
- ~/official-images/test/run.sh "$image-passenger"
18+
- |
19+
(
20+
set -Eeuo pipefail
21+
set -x
22+
docker build -t "$image" .
23+
~/official-images/test/run.sh "$image"
24+
docker build -t "$image-passenger" passenger
25+
~/official-images/test/run.sh "$image-passenger"
26+
)
2127
2228
after_script:
2329
- docker images

3.3/Dockerfile

Lines changed: 62 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,7 @@ RUN groupadd -r redmine && useradd -r -g redmine redmine
66
RUN apt-get update && apt-get install -y --no-install-recommends \
77
ca-certificates \
88
wget \
9-
&& rm -rf /var/lib/apt/lists/*
10-
11-
# grab gosu for easy step-down from root
12-
ENV GOSU_VERSION 1.10
13-
RUN set -x \
14-
&& fetchDeps=" \
15-
dirmngr \
16-
gnupg \
17-
" \
18-
&& apt-get update \
19-
&& apt-get install -y --no-install-recommends $fetchDeps \
20-
\
21-
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
22-
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
23-
&& export GNUPGHOME="$(mktemp -d)" \
24-
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
25-
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
26-
&& gpgconf --kill all \
27-
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
28-
&& chmod +x /usr/local/bin/gosu \
29-
&& gosu nobody true \
30-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
31-
&& rm -rf /var/lib/apt/lists/*
32-
33-
# grab tini for signal processing and zombie killing
34-
ENV TINI_VERSION v0.16.1
35-
RUN set -x \
36-
&& fetchDeps=" \
37-
dirmngr \
38-
gnupg \
39-
" \
40-
&& apt-get update \
41-
&& apt-get install -y --no-install-recommends $fetchDeps \
42-
\
43-
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture)" \
44-
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture).asc" \
45-
&& export GNUPGHOME="$(mktemp -d)" \
46-
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
47-
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
48-
&& gpgconf --kill all \
49-
&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \
50-
&& chmod +x /usr/local/bin/tini \
51-
&& tini -h \
52-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
53-
&& rm -rf /var/lib/apt/lists/*
54-
55-
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
\
5610
bzr \
5711
git \
5812
imagemagick \
@@ -61,6 +15,48 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6115
subversion \
6216
&& rm -rf /var/lib/apt/lists/*
6317

18+
RUN set -eux; \
19+
savedAptMark="$(apt-mark showmanual)"; \
20+
apt-get update; \
21+
apt-get install -y --no-install-recommends \
22+
dirmngr \
23+
gnupg \
24+
; \
25+
rm -rf /var/lib/apt/lists/*; \
26+
\
27+
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
28+
\
29+
# grab gosu for easy step-down from root
30+
# https://github.com/tianon/gosu/releases
31+
export GOSU_VERSION='1.10'; \
32+
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
33+
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
34+
export GNUPGHOME="$(mktemp -d)"; \
35+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
36+
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
37+
gpgconf --kill all; \
38+
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
39+
chmod +x /usr/local/bin/gosu; \
40+
gosu nobody true; \
41+
\
42+
# grab tini for signal processing and zombie killing
43+
# https://github.com/krallin/tini/releases
44+
export TINI_VERSION='0.18.0'; \
45+
wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch"; \
46+
wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc"; \
47+
export GNUPGHOME="$(mktemp -d)"; \
48+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5; \
49+
gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
50+
gpgconf --kill all; \
51+
rm -r "$GNUPGHOME" /usr/local/bin/tini.asc; \
52+
chmod +x /usr/local/bin/tini; \
53+
tini -h; \
54+
\
55+
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
56+
apt-mark auto '.*' > /dev/null; \
57+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
58+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
59+
6460
ENV RAILS_ENV production
6561
WORKDIR /usr/src/redmine
6662

@@ -79,20 +75,36 @@ RUN set -eux; \
7975
savedAptMark="$(apt-mark showmanual)"; \
8076
apt-get update; \
8177
apt-get install -y --no-install-recommends \
82-
freetds-dev \
78+
dpkg-dev \
8379
gcc \
8480
libmagickcore-dev \
8581
libmagickwand-dev \
8682
libmariadbclient-dev \
8783
libpq-dev \
8884
libsqlite3-dev \
89-
# TinyTDS 1.0.x requires openssl 1.0.x
90-
libssl1.0-dev \
9185
make \
9286
patch \
87+
\
88+
# tiny_tds 1.0.x requires OpenSSL 1.0
89+
# see https://github.com/rails-sqlserver/tiny_tds/commit/3269dd3bcfbe4201ab51aa2870a6aaddfcbdfa5d (tiny_tds 1.2.x+ is required for OpenSSL 1.1 support)
90+
libssl1.0-dev \
9391
; \
9492
rm -rf /var/lib/apt/lists/*; \
9593
\
94+
# https://github.com/travis-ci/travis-ci/issues/9391 (can't let "tiny_tds" download FreeTDS for us because FTP)
95+
# https://github.com/rails-sqlserver/tiny_tds/pull/384 (newer version uses HTTP!)
96+
# https://github.com/rails-sqlserver/tiny_tds/pull/345 (... but then can't download it for us)
97+
# http://www.freetds.org/files/stable/?C=M;O=D
98+
# (if/when we update to Debian Buster and thus get FreeTDS newer than 0.95 in the distro, we can switch back to simply installing "freetds-dev" from Debian)
99+
wget -O freetds.tar.bz2 'http://www.freetds.org/files/stable/freetds-1.00.91.tar.bz2'; \
100+
echo '8d71f9f29be0fe0637e443dd3807b3fd *freetds.tar.bz2' | md5sum -c -; \
101+
mkdir freetds; \
102+
tar -xf freetds.tar.bz2 -C freetds --strip-components=1; \
103+
rm freetds.tar.bz2; \
104+
( cd freetds && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && ./configure --build="$gnuArch" --enable-silent-rules && make -j "$(nproc)" && make -C src install && make -C include install ); \
105+
rm -rf freetds; \
106+
bundle config build.tiny_tds --enable-system-freetds; \
107+
\
96108
bundle install --without development test; \
97109
for adapter in mysql2 postgresql sqlserver sqlite3; do \
98110
echo "$RAILS_ENV:" > ./config/database.yml; \

3.4/Dockerfile

Lines changed: 62 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,7 @@ RUN groupadd -r redmine && useradd -r -g redmine redmine
66
RUN apt-get update && apt-get install -y --no-install-recommends \
77
ca-certificates \
88
wget \
9-
&& rm -rf /var/lib/apt/lists/*
10-
11-
# grab gosu for easy step-down from root
12-
ENV GOSU_VERSION 1.10
13-
RUN set -x \
14-
&& fetchDeps=" \
15-
dirmngr \
16-
gnupg \
17-
" \
18-
&& apt-get update \
19-
&& apt-get install -y --no-install-recommends $fetchDeps \
20-
\
21-
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
22-
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
23-
&& export GNUPGHOME="$(mktemp -d)" \
24-
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
25-
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
26-
&& gpgconf --kill all \
27-
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
28-
&& chmod +x /usr/local/bin/gosu \
29-
&& gosu nobody true \
30-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
31-
&& rm -rf /var/lib/apt/lists/*
32-
33-
# grab tini for signal processing and zombie killing
34-
ENV TINI_VERSION v0.16.1
35-
RUN set -x \
36-
&& fetchDeps=" \
37-
dirmngr \
38-
gnupg \
39-
" \
40-
&& apt-get update \
41-
&& apt-get install -y --no-install-recommends $fetchDeps \
42-
\
43-
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture)" \
44-
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture).asc" \
45-
&& export GNUPGHOME="$(mktemp -d)" \
46-
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
47-
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
48-
&& gpgconf --kill all \
49-
&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \
50-
&& chmod +x /usr/local/bin/tini \
51-
&& tini -h \
52-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
53-
&& rm -rf /var/lib/apt/lists/*
54-
55-
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
\
5610
bzr \
5711
git \
5812
imagemagick \
@@ -61,6 +15,48 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6115
subversion \
6216
&& rm -rf /var/lib/apt/lists/*
6317

18+
RUN set -eux; \
19+
savedAptMark="$(apt-mark showmanual)"; \
20+
apt-get update; \
21+
apt-get install -y --no-install-recommends \
22+
dirmngr \
23+
gnupg \
24+
; \
25+
rm -rf /var/lib/apt/lists/*; \
26+
\
27+
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
28+
\
29+
# grab gosu for easy step-down from root
30+
# https://github.com/tianon/gosu/releases
31+
export GOSU_VERSION='1.10'; \
32+
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
33+
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
34+
export GNUPGHOME="$(mktemp -d)"; \
35+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
36+
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
37+
gpgconf --kill all; \
38+
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
39+
chmod +x /usr/local/bin/gosu; \
40+
gosu nobody true; \
41+
\
42+
# grab tini for signal processing and zombie killing
43+
# https://github.com/krallin/tini/releases
44+
export TINI_VERSION='0.18.0'; \
45+
wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch"; \
46+
wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc"; \
47+
export GNUPGHOME="$(mktemp -d)"; \
48+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5; \
49+
gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
50+
gpgconf --kill all; \
51+
rm -r "$GNUPGHOME" /usr/local/bin/tini.asc; \
52+
chmod +x /usr/local/bin/tini; \
53+
tini -h; \
54+
\
55+
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
56+
apt-mark auto '.*' > /dev/null; \
57+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
58+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
59+
6460
ENV RAILS_ENV production
6561
WORKDIR /usr/src/redmine
6662

@@ -79,20 +75,36 @@ RUN set -eux; \
7975
savedAptMark="$(apt-mark showmanual)"; \
8076
apt-get update; \
8177
apt-get install -y --no-install-recommends \
82-
freetds-dev \
78+
dpkg-dev \
8379
gcc \
8480
libmagickcore-dev \
8581
libmagickwand-dev \
8682
libmariadbclient-dev \
8783
libpq-dev \
8884
libsqlite3-dev \
89-
# TinyTDS 1.0.x requires openssl 1.0.x
90-
libssl1.0-dev \
9185
make \
9286
patch \
87+
\
88+
# tiny_tds 1.0.x requires OpenSSL 1.0
89+
# see https://github.com/rails-sqlserver/tiny_tds/commit/3269dd3bcfbe4201ab51aa2870a6aaddfcbdfa5d (tiny_tds 1.2.x+ is required for OpenSSL 1.1 support)
90+
libssl1.0-dev \
9391
; \
9492
rm -rf /var/lib/apt/lists/*; \
9593
\
94+
# https://github.com/travis-ci/travis-ci/issues/9391 (can't let "tiny_tds" download FreeTDS for us because FTP)
95+
# https://github.com/rails-sqlserver/tiny_tds/pull/384 (newer version uses HTTP!)
96+
# https://github.com/rails-sqlserver/tiny_tds/pull/345 (... but then can't download it for us)
97+
# http://www.freetds.org/files/stable/?C=M;O=D
98+
# (if/when we update to Debian Buster and thus get FreeTDS newer than 0.95 in the distro, we can switch back to simply installing "freetds-dev" from Debian)
99+
wget -O freetds.tar.bz2 'http://www.freetds.org/files/stable/freetds-1.00.91.tar.bz2'; \
100+
echo '8d71f9f29be0fe0637e443dd3807b3fd *freetds.tar.bz2' | md5sum -c -; \
101+
mkdir freetds; \
102+
tar -xf freetds.tar.bz2 -C freetds --strip-components=1; \
103+
rm freetds.tar.bz2; \
104+
( cd freetds && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && ./configure --build="$gnuArch" --enable-silent-rules && make -j "$(nproc)" && make -C src install && make -C include install ); \
105+
rm -rf freetds; \
106+
bundle config build.tiny_tds --enable-system-freetds; \
107+
\
96108
bundle install --without development test; \
97109
for adapter in mysql2 postgresql sqlserver sqlite3; do \
98110
echo "$RAILS_ENV:" > ./config/database.yml; \

0 commit comments

Comments
 (0)