Skip to content

Commit

Permalink
Use alpine as the base container for the docker image
Browse files Browse the repository at this point in the history
instead of the standard python:3.5 image; this reduces the size from
over 700 MB to 85 MB.
  • Loading branch information
rtzll committed Nov 5, 2016
1 parent 1404233 commit 16db107
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
FROM python:3.5
FROM alpine:3.4

# from https://github.com/frol/docker-alpine-python3
RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
rm -r /root/.cache

ADD . /code
WORKDIR /code
RUN pip install gunicorn
Expand Down

0 comments on commit 16db107

Please sign in to comment.