Skip to content

Instantly share code, notes, and snippets.

@vubon
Created August 29, 2018 10:28
Show Gist options
  • Save vubon/61c0a7879dfb202f742c6c0529abea12 to your computer and use it in GitHub Desktop.
Save vubon/61c0a7879dfb202f742c6c0529abea12 to your computer and use it in GitHub Desktop.
Dockerfile with alpine 3.6 python
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