-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile.alpine
56 lines (49 loc) · 1.32 KB
/
Dockerfile.alpine
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
47
48
49
50
51
52
53
54
55
56
ARG PYTHON_VERSION="3.7"
FROM python:$PYTHON_VERSION-alpine3.10
LABEL maintainer="Kyle Wilcox <[email protected]>"
ARG LUIGI_VERSION="2.8.13"
ARG LUIGI_CONFIG_DIR="/etc/luigi/"
ARG LUIGI_CONFIG_PATH="/etc/luigi/luigi.conf"
ARG LUIGI_STATE_DIR="/luigi/state"
ENV LUIGI_VERSION="${LUIGI_VERSION}"
RUN echo "**** install binary packages ****" && \
apk add --no-cache --virtual .build-deps \
build-base \
gcc \
musl-dev \
libc-dev \
libffi-dev \
python3-dev \
py-mysqldb \
postgresql-dev \
mariadb-dev \
mariadb-connector-c-dev \
&& \
\
echo "**** install python packages ****" && \
python3 -m pip install \
luigi=="${LUIGI_VERSION}" \
sqlalchemy \
psycopg2 \
mysql-connector-python \
mysqlclient \
prometheus_client \
&& \
apk add --virtual \
mariadb-client-libs \
mariadb-connector-c \
postgresql-libs \
&& \
\
echo "**** cleanup ****" && \
apk --purge del .build-deps && \
\
echo "**** finalize ****" && \
mkdir -p "${LUIGI_CONFIG_DIR}" && \
mkdir -p "${LUIGI_STATE_DIR}"
COPY logging.conf "${LUIGI_CONFIG_DIR}"
COPY luigi.conf "${LUIGI_CONFIG_DIR}"
VOLUME ["${LUIGI_CONFIG_DIR}", "${LUIGI_STATE_DIR}"]
EXPOSE 8082/TCP
COPY luigid.sh /bin/run
ENTRYPOINT ["/bin/run"]