-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
39 lines (28 loc) · 958 Bytes
/
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
32
33
34
35
36
37
38
39
# --------------------------------------------------------------------------
# This is a Dockerfile to build a Python / Alpine Linux image with
# luigid running on port 8082
# --------------------------------------------------------------------------
FROM python:alpine
MAINTAINER Tim Birkett <[email protected]> (@pysysops)
ARG user=app
ARG group=app
ARG uid=2101
ARG gid=2101
# The luigi app is run with user `app`, uid = 2101
# If you bind mount a volume from the host or a data container,
# ensure you use the same uid
RUN addgroup -g ${gid} ${group} \
&& adduser -u ${uid} -G ${group} -D -s /bin/bash ${user}
RUN pip install sqlalchemy luigi
RUN mkdir /etc/luigi
ADD ./etc/luigi/logging.cfg /etc/luigi/
ADD ./etc/luigi/client.cfg /etc/luigi/
VOLUME /etc/luigi
RUN mkdir -p /luigi/logs
RUN mkdir -p /luigi/state
RUN chown -R ${user}:${group} /luigi
VOLUME /luigi/logs
VOLUME /luigi/state
EXPOSE 8082
USER ${user}
ENTRYPOINT ["luigid"]