-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (15 loc) · 756 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
FROM python:3.8-alpine3.12 AS builder
RUN python -mvenv /venv
ENV PATH="/venv/bin:$PATH"
ADD requirements.txt /requirements.txt
RUN apk -X http://dl-cdn.alpinelinux.org/alpine/v3.12/main -X http://dl-cdn.alpinelinux.org/alpine/v3.12/community add --no-cache --virtual .build-deps build-base libxslt-dev libxslt && \
# apk -X http://dl-cdn.alpinelinux.org/alpine/v3.12/community add --no-cache libxslt && \
pip install -r requirements.txt && \
apk del .build-deps
FROM python:3.8-alpine3.12
RUN apk -X http://dl-cdn.alpinelinux.org/alpine/v3.12/community add --no-cache libxslt
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
ENV PATH="/venv/bin:$PATH"
RUN echo $PATH $VIRTUAL_ENV
ADD check.py /check.py
CMD [ "python", "/check.py" ]