-
Notifications
You must be signed in to change notification settings - Fork 54
/
Dockerfile
31 lines (27 loc) · 1.11 KB
/
Dockerfile
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
FROM rawmind/alpine-monit:0.5.18-5
MAINTAINER Raul Sanchez <rawmind@gmail.com>
#Set environment
ENV SERVICE_NAME=traefik \
SERVICE_HOME=/opt/traefik \
SERVICE_VERSION=v1.0.0-rc3 \
SERVICE_USER=traefik \
SERVICE_UID=10001 \
SERVICE_GROUP=traefik \
SERVICE_GID=10001 \
SERVICE_URL=https://github.com/containous/traefik/releases/download
ENV SERVICE_RELEASE=${SERVICE_URL}/${SERVICE_VERSION}/traefik_linux-amd64 \
PATH=${PATH}:${SERVICE_HOME}/bin
# Download and install traefik
RUN mkdir -p ${SERVICE_HOME}/bin ${SERVICE_HOME}/etc ${SERVICE_HOME}/log ${SERVICE_HOME}/certs \
&& cd ${SERVICE_HOME}/bin \
&& curl -jksSL "${SERVICE_RELEASE}" -O \
&& mv traefik_linux-amd64 traefik \
&& chmod +x ${SERVICE_HOME}/bin/traefik \
&& addgroup -g ${SERVICE_GID} ${SERVICE_GROUP} \
&& adduser -g "${SERVICE_NAME} user" -D -h ${SERVICE_HOME} -G ${SERVICE_GROUP} -s /sbin/nologin -u ${SERVICE_UID} ${SERVICE_USER}
ADD root /
RUN chmod +x ${SERVICE_HOME}/bin/*.sh \
&& chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SERVICE_HOME} /opt/monit
USER $SERVICE_USER
WORKDIR $SERVICE_HOME
EXPOSE 8000 8080 8443