-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace supervisord with s6
This change looks to drop the python dependency in the base image and replaces supervisord with [s6](https://github.com/just-containers/s6-overlay). If we could get this branch pushed to the `s6` tag on Docker it will allow us to test this with the downstream containers. I will update the README.md if it's decided that we will adopt s6 over supervisord.
- Loading branch information
Showing
13 changed files
with
34 additions
and
156 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 |
---|---|---|
@@ -1,25 +1,28 @@ | ||
FROM ubuntu:bionic | ||
MAINTAINER LanCache.Net Team <[email protected]> | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN \ | ||
apt-get -y update && apt-get -y upgrade && \ | ||
apt-get -y install python3-pip curl wget bzip2 locales tzdata && \ | ||
locale-gen en_GB.utf8 && \ | ||
update-locale LANG=en_GB.utf8 | ||
RUN \ | ||
pip3 install supervisor && \ | ||
mkdir --mode 777 -p /var/log/supervisor | ||
RUN \ | ||
apt-get -y clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
ARG ARCH="amd64" | ||
ARG OVERLAY_VERSION="v2.2.0.3" | ||
|
||
ENV \ | ||
SUPERVISORD_EXIT_ON_FATAL=1 \ | ||
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \ | ||
LC_ALL=en_GB.UTF-8 \ | ||
LANG=en_GB.UTF-8 \ | ||
LANGUAGE=en_GB.UTF-8 \ | ||
TZ=Europe/London \ | ||
SUPERVISORD_LOGLEVEL=WARN | ||
TZ=Europe/London | ||
|
||
COPY overlay/ / | ||
RUN chmod -R 755 /init /hooks | ||
ENTRYPOINT ["/bin/bash", "-e", "/init/entrypoint"] | ||
CMD ["/init/supervisord"] | ||
|
||
RUN \ | ||
apt-get -y update && apt-get -y upgrade && \ | ||
apt-get -y install curl wget bzip2 locales tzdata && \ | ||
locale-gen en_GB.utf8 && \ | ||
update-locale LANG=en_GB.utf8 \ | ||
cd /tmp && \ | ||
curl -sSfL -o s6-overlay.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.gz" && \ | ||
tar xfz s6-overlay.tar.gz -C / && \ | ||
apt-get -y clean && \ | ||
rm -rf /tmp/* /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT ["/init"] |
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
cat <<EOF | ||
_ _____ _ _ | ||
| | / ____| | | | | | ||
| | __ _ _ __ | | __ _ ___| |__ ___ _ __ ___| |_ | ||
| | / _\` | '_ \| | / _\` |/ __| '_ \ / _ \ | '_ \ / _ \ __| | ||
| |___| (_| | | | | |___| (_| | (__| | | | __/_| | | | __/ |_ | ||
|______\__,_|_| |_|\_____\__,_|\___|_| |_|\___(_)_| |_|\___|\__| | ||
|
||
|
||
EOF |
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$@" == *" -- "* ]]; then | ||
SD_LOGLEVEL="-e SUPERVISORD_LOGLEVEL=INFO" | ||
else | ||
SD_LOGLEVEL="-- -e SUPERVISORD_LOGLEVEL=INFO" | ||
fi | ||
|
||
curl -fsSL https://raw.githubusercontent.com/lancachenet/test-suite/master/dgoss-tests.sh | bash -s -- --imagename="lancachenet/ubuntu:goss-test" $@ $SD_LOGLEVEL | ||
curl -fsSL https://raw.githubusercontent.com/lancachenet/test-suite/master/dgoss-tests.sh | bash -s -- --imagename="lancachenet/ubuntu:goss-test" $@ |