Skip to content

Commit

Permalink
Tweak a few more things
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Jun 20, 2018
1 parent 084ed67 commit 8f31913
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 154 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ install:

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

script:
- travis_retry docker build -t "$image" .
- ~/official-images/test/run.sh "$image"
- travis_retry docker build -t "$image-passenger" passenger
- ~/official-images/test/run.sh "$image-passenger"
- |
(
set -Eeuo pipefail
set -x
docker build -t "$image" .
~/official-images/test/run.sh "$image"
docker build -t "$image-passenger" passenger
~/official-images/test/run.sh "$image-passenger"
)
after_script:
- docker images
Expand Down
99 changes: 49 additions & 50 deletions 3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,7 @@ RUN groupadd -r redmine && useradd -r -g redmine redmine
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& fetchDeps=" \
dirmngr \
gnupg \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $fetchDeps \
\
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& gpgconf --kill all \
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*

# grab tini for signal processing and zombie killing
ENV TINI_VERSION v0.16.1
RUN set -x \
&& fetchDeps=" \
dirmngr \
gnupg \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $fetchDeps \
\
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
&& gpgconf --kill all \
&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \
&& chmod +x /usr/local/bin/tini \
&& tini -h \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y --no-install-recommends \
\
bzr \
git \
imagemagick \
Expand All @@ -61,6 +15,48 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
subversion \
&& rm -rf /var/lib/apt/lists/*

RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
dirmngr \
gnupg \
; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
\
# grab gosu for easy step-down from root
# https://github.com/tianon/gosu/releases
export GOSU_VERSION='1.10'; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
chmod +x /usr/local/bin/gosu; \
gosu nobody true; \
\
# grab tini for signal processing and zombie killing
# https://github.com/krallin/tini/releases
export TINI_VERSION='0.18.0'; \
wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch"; \
wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5; \
gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" /usr/local/bin/tini.asc; \
chmod +x /usr/local/bin/tini; \
tini -h; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

ENV RAILS_ENV production
WORKDIR /usr/src/redmine

Expand All @@ -79,17 +75,20 @@ RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
freetds-dev \
gcc \
libmagickcore-dev \
libmagickwand-dev \
libmariadbclient-dev \
libpq-dev \
libsqlite3-dev \
# TinyTDS 1.0.x requires openssl 1.0.x
libssl1.0-dev \
make \
patch \
\
# tiny_tds 0.6.x requires freetds-dev from Debian (but Redmine 3.4 uses tiny_tds 1.0.x which downloads a newer version anyhow)
freetds-dev \
# tiny_tds 1.0.x requires OpenSSL 1.0
# see https://github.com/rails-sqlserver/tiny_tds/commit/3269dd3bcfbe4201ab51aa2870a6aaddfcbdfa5d (tiny_tds 1.2.x+ is required for OpenSSL 1.1 support)
libssl1.0-dev \
; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down
97 changes: 47 additions & 50 deletions 3.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,7 @@ RUN groupadd -r redmine && useradd -r -g redmine redmine
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& fetchDeps=" \
dirmngr \
gnupg \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $fetchDeps \
\
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& gpgconf --kill all \
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*

# grab tini for signal processing and zombie killing
ENV TINI_VERSION v0.16.1
RUN set -x \
&& fetchDeps=" \
dirmngr \
gnupg \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $fetchDeps \
\
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
&& gpgconf --kill all \
&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \
&& chmod +x /usr/local/bin/tini \
&& tini -h \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y --no-install-recommends \
\
bzr \
git \
imagemagick \
Expand All @@ -61,6 +15,48 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
subversion \
&& rm -rf /var/lib/apt/lists/*

RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
dirmngr \
gnupg \
; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
\
# grab gosu for easy step-down from root
# https://github.com/tianon/gosu/releases
export GOSU_VERSION='1.10'; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
chmod +x /usr/local/bin/gosu; \
gosu nobody true; \
\
# grab tini for signal processing and zombie killing
# https://github.com/krallin/tini/releases
export TINI_VERSION='0.18.0'; \
wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch"; \
wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5; \
gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" /usr/local/bin/tini.asc; \
chmod +x /usr/local/bin/tini; \
tini -h; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

ENV RAILS_ENV production
WORKDIR /usr/src/redmine

Expand All @@ -79,17 +75,18 @@ RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends \
freetds-dev \
gcc \
libmagickcore-dev \
libmagickwand-dev \
libmariadbclient-dev \
libpq-dev \
libsqlite3-dev \
# TinyTDS 1.0.x requires openssl 1.0.x
libssl1.0-dev \
make \
patch \
\
# tiny_tds 1.0.x requires OpenSSL 1.0
# see https://github.com/rails-sqlserver/tiny_tds/commit/3269dd3bcfbe4201ab51aa2870a6aaddfcbdfa5d (tiny_tds 1.2.x+ is required for OpenSSL 1.1 support)
libssl1.0-dev \
; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down
Loading

0 comments on commit 8f31913

Please sign in to comment.