Last active
April 17, 2020 12:33
-
-
Save deliro/509b663093ff0f49c1b71e1876597ccb to your computer and use it in GitHub Desktop.
python alpine lxml image example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7-alpine | |
EXPOSE 8000 | |
WORKDIR /app | |
COPY . . | |
RUN apk add --update --no-cache --virtual .build-deps \ | |
g++ \ | |
python-dev \ | |
libxml2 \ | |
libxml2-dev && \ | |
apk add libxslt-dev && \ | |
pip install --no-cache-dir -r req.txt && \ | |
apk del .build-deps | |
CMD ["gunicorn", "-c", "gunicorn_config.py", "src.app:application"] |
NMelis
commented
May 30, 2019
•
FROM python:3.7-alpine EXPOSE 8000 RUN apk add --update --no-cache --virtual .build-deps \ g++ \ python-dev \ libxml2 \ libxml2-dev && \ apk add libxslt-dev && \ apk del .build-deps RUN pip install --no-cache-dir -r req.txt WORKDIR /app COPY . . CMD ["gunicorn", "-c", "gunicorn_config.py", "src.app:application"]
Dont you delete deps before the install?
Okey
FROM python:3.7-alpine
EXPOSE 8000
RUN apk add --update --no-cache --virtual .build-deps \
g++ \
python-dev \
libxml2 \
libxml2-dev && \
apk add libxslt-dev
RUN pip install --no-cache-dir -r req.txt
RUN apk del .build-deps
WORKDIR /app
COPY . .
CMD ["gunicorn", "-c", "gunicorn_config.py", "src.app:application"]
FROM python:3.7-alpine EXPOSE 8000 RUN apk add --update --no-cache --virtual .build-deps \ g++ \ python-dev \ libxml2 \ libxml2-dev && \ apk add libxslt-dev && \ apk del .build-deps RUN pip install --no-cache-dir -r req.txt WORKDIR /app COPY . . CMD ["gunicorn", "-c", "gunicorn_config.py", "src.app:application"]
Dont you delete deps before the install?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment