Created
August 29, 2018 10:28
-
-
Save vubon/61c0a7879dfb202f742c6c0529abea12 to your computer and use it in GitHub Desktop.
Dockerfile with alpine 3.6 python
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 alpine:3.6 | |
ENV PYTHONUNBUFFERED 1 | |
WORKDIR /usr/src/national_id | |
ADD requirements.txt /usr/src/national_id/ | |
RUN apk add --no-cache python3 && \ | |
python3 -m ensurepip && \ | |
rm -r /usr/lib/python*/ensurepip && \ | |
pip3 install --upgrade pip setuptools && \ | |
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ | |
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \ | |
rm -r /root/.cache | |
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev && pip install -r requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment