forked from esme518/docker-drpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (43 loc) · 1.09 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
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
57
#
# Dockerfile for dr_py
#
FROM python:3.7-alpine as builder
RUN set -ex \
&& apk add --update --no-cache \
alpine-sdk \
libffi-dev \
libxslt-dev \
&& rm -rf /tmp/* /var/cache/apk/*
WORKDIR /builder
COPY requirements.txt /builder
RUN set -ex \
&& pip install --upgrade pip \
&& mkdir whl \
&& pip wheel -r requirements.txt -w ./whl \
&& ls whl
FROM python:3.7-alpine
COPY --from=builder /builder /builder
COPY docker-entrypoint.sh /entrypoint.sh
COPY supervisord.init /etc/supervisord.init
ENV REPO_URL https://gitcode.net/qq_32394351/dr_py.git
RUN set -ex \
&& apk add --update --no-cache \
git \
libstdc++ \
libxslt \
&& rm -rf /tmp/* /var/cache/apk/*
WORKDIR /builder
RUN set -ex \
&& ls whl \
&& pip install --upgrade pip \
&& pip install --no-index --find-links ./whl -r requirements.txt \
&& rm -rf /builder
WORKDIR /root/sd/pywork/dr_py
VOLUME /root/sd/pywork/dr_py
ENV PYTHONUNBUFFERED=1
ENV AUTOUPDATE=
ENV INET_USERNAME=user
ENV INET_PASSWORD=123
EXPOSE 5705 9001
ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord","-c","/etc/supervisord.conf"]