Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to the S6 init system #10

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Migrate from supervisord to s6
  • Loading branch information
brutalgg committed Oct 3, 2020
commit a5909600271f92c013b131013510fedcd06bd42e
52 changes: 34 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
FROM ubuntu:bionic
MAINTAINER LanCache.Net Team <team@lancache.net>
LABEL maintainer="LanCache.Net Team <team@lancache.net>"

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/*
ENV \
SUPERVISORD_EXIT_ON_FATAL=1 \
ENV \
LC_ALL=en_GB.UTF-8 \
LANG=en_GB.UTF-8 \
LANGUAGE=en_GB.UTF-8 \
TZ=Europe/London \
SUPERVISORD_LOGLEVEL=WARN

ADD ["https://github.com/just-containers/s6-overlay/releases/download/v1.17.2.0/s6-overlay-amd64.tar.gz", "/tmp"]

ENTRYPOINT ["/init"]

RUN \
# Extract S6 overlay
tar xzf /tmp/s6-overlay-amd64.tar.gz -C / && \
# Update and get dependencies
apt-get update && \
apt-get install -y \
curl \
wget \
bzip2 \
locales \
tzdata \
&& \
# Add user
useradd -U -d ${HOME} -s /bin/bash abc && \
usermod -G users abc && \
# Timezone
locale-gen en_GB.utf8 && \
update-locale LANG=en_GB.utf8 && \
# Cleanup
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
rm -rf var/tmp/*


COPY overlay/ /
RUN chmod -R 755 /init /hooks
ENTRYPOINT ["/bin/bash", "-e", "/init/entrypoint"]
CMD ["/init/supervisord"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions overlay/etc/supervisor/supervisord.conf

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions overlay/hooks/supervisord-ready

This file was deleted.

68 changes: 0 additions & 68 deletions overlay/init/entrypoint

This file was deleted.

29 changes: 0 additions & 29 deletions overlay/init/supervisord

This file was deleted.