-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from bryanlatten/feature-s6-upgrade
Dockerfile: update goss and S6 from env vars
- Loading branch information
Showing
3 changed files
with
22 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,31 +6,35 @@ MAINTAINER Bryan Latten <[email protected]> | |
ENV SIGNAL_BUILD_STOP=99 \ | ||
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \ | ||
S6_KILL_FINISH_MAXTIME=5000 \ | ||
S6_KILL_GRACETIME=3000 | ||
S6_KILL_GRACETIME=3000 \ | ||
S6_VERSION=v1.18.1.5 \ | ||
GOSS_VERSION=v0.2.3 | ||
|
||
# Upgrade base packages, then clean packaging leftover | ||
RUN apt-get update && \ | ||
apt-get upgrade -yqq && \ | ||
apt-get install -yqq \ | ||
curl \ | ||
&& \ | ||
# Add goss for local testing | ||
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.2.3/goss-linux-amd64 -o /usr/local/bin/goss && \ | ||
# Add S6 for zombie reaping, boot-time coordination, signal transformation/distribution | ||
curl -L https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-amd64.tar.gz -o /tmp/s6.tar.gz && \ | ||
tar xzf /tmp/s6.tar.gz -C / && \ | ||
rm /tmp/s6.tar.gz && \ | ||
# Add goss for local, serverspec-like testing \ | ||
curl -L https://github.com/aelsabbahy/goss/releases/download/${GOSS_VERSION}/goss-linux-amd64 -o /usr/local/bin/goss && \ | ||
chmod +x /usr/local/bin/goss && \ | ||
apt-get remove --purge -yq curl && \ | ||
apt-get remove --purge -yq \ | ||
curl \ | ||
&& \ | ||
apt-get autoclean -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/{cache,log}/ && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
rm -rf /var/lib/apt/lists/*.lz4 && \ | ||
rm -rf /tmp/* /var/tmp/* | ||
|
||
# Overlay the root filesystem from this repo | ||
COPY ./container/root / | ||
|
||
# Add S6 overlay build, to avoid having to build from source | ||
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / && \ | ||
rm /tmp/s6-overlay-amd64.tar.gz | ||
|
||
RUN goss -g goss.base.yaml validate | ||
|
||
# NOTE: intentionally NOT using s6 init as the entrypoint | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ MAINTAINER Bryan Latten <[email protected]> | |
ENV SIGNAL_BUILD_STOP=99 \ | ||
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \ | ||
S6_KILL_FINISH_MAXTIME=5000 \ | ||
S6_KILL_GRACETIME=3000 | ||
S6_KILL_GRACETIME=3000 \ | ||
S6_VERSION=v1.18.1.5 \ | ||
GOSS_VERSION=v0.2.3 | ||
|
||
RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \ | ||
apk update && \ | ||
|
@@ -16,18 +18,19 @@ RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/r | |
grep \ | ||
curl \ | ||
&& \ | ||
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.2.3/goss-linux-amd64 -o /usr/local/bin/goss && \ | ||
# Add S6 for zombie reaping, boot-time coordination, signal transformation/distribution | ||
curl -L https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-amd64.tar.gz -o /tmp/s6.tar.gz && \ | ||
tar xzf /tmp/s6.tar.gz -C / && \ | ||
rm /tmp/s6.tar.gz && \ | ||
# Add goss for local, serverspec-like testing \ | ||
curl -L https://github.com/aelsabbahy/goss/releases/download/${GOSS_VERSION}/goss-linux-amd64 -o /usr/local/bin/goss && \ | ||
chmod +x /usr/local/bin/goss && \ | ||
apk del curl && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
# Overlay the root filesystem from this repo | ||
COPY ./container/root / | ||
|
||
# Add S6 overlay build, to avoid having to build from source | ||
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / && \ | ||
rm /tmp/s6-overlay-amd64.tar.gz | ||
|
||
RUN goss -g goss.base.yaml validate | ||
|
||
# NOTE: intentionally NOT using s6 init as the entrypoint | ||
|
Binary file not shown.