forked from nsquarednz/s6-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-ubuntu
46 lines (44 loc) · 1.42 KB
/
Dockerfile-ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ubuntu:16.04
# Set version for s6 overlay
ARG OVERLAY_VERSION="v1.22.1.0"
# Set arch for s6 overlay
ARG OVERLAY_ARCH="amd64"
# Set version for s6-init packages
ARG S6_INIT_SCRIPTS_VERSION="v0.8"
# Set s6-init packages to install
ARG S6_INIT_PACKAGES="nginx"
RUN \
echo "**** Update sources ****" \
&& apt-get update \
&& \
echo "**** Install core dependencies ****" \
&& apt-get install -y \
curl \
nginx \
&& \
echo "**** Add s6 overlay ****" \
&& curl -o \
/tmp/s6-overlay.tar.gz -L \
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz" \
&& tar xfz \
/tmp/s6-overlay.tar.gz -C / \
&& \
echo "**** Create docker user and make the user folders ****" \
&& groupmod -g 1000 users \
&& useradd -u 1000 -U -d /config -s /bin/false docker \
&& usermod -G users docker \
&& mkdir -p \
/app \
/config \
/defaults \
&& \
echo "**** Install init process ****" \
&& curl -L "https://github.com/Josh5/s6-init/archive/${S6_INIT_SCRIPTS_VERSION}.tar.gz" -o /tmp/s6-init.tar.gz \
&& tar xfz /tmp/s6-init.tar.gz -C /tmp \
&& cd /tmp/s6-init-* \
&& ./install \
&& \
echo "**** Cleanup ****" \
&& apt-get clean \
&& rm -rf \
/tmp/*