-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
24 lines (22 loc) · 1.05 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
# mesudip/python-nginx:alpine is merge of official python and nginx images.
FROM mesudip/python-nginx
RUN pip install --upgrade pip
HEALTHCHECK --interval=10s --timeout=2s --start-period=10s --retries=3 CMD pgrep nginx && pgrep python3 >> /dev/null || exit 1
VOLUME ["/etc/nginx/dhparam", "/tmp/acme-challenges/","/etc/nginx/conf.d","/etc/nginx/ssl"]
CMD ["sh","-e" ,"/docker-entrypoint.sh"]
COPY ./requirements.txt /requirements.txt
RUN apk --no-cache add openssl && \
apk add --no-cache --virtual .build-deps \
gcc libc-dev openssl-dev linux-headers libffi-dev && \
pip install --no-cache-dir -r /requirements.txt && \
rm -f /requirements.txt && apk del .build-deps && \
ln -s /app/getssl /bin/getssl && ln -s /app/verify /bin/verify && \
ln -s /app/docker-entrypoint.sh /docker-entrypoint.sh
ARG LETSENCRYPT_API="https://acme-v02.api.letsencrypt.org/directory"
ENV LETSENCRYPT_API=${LETSENCRYPT_API} \
CHALLENGE_DIR=/tmp/acme-challenges/ \
DHPARAM_SIZE=2048 \
CLIENT_MAX_BODY_SIZE=1m \
DEFAULT_HOST=true
WORKDIR /app
COPY . /app/