Alpine based Python container
Alpine based docker image with Python3 and pip.
moppermonster/alpine-python
# Install Python
RUN apk add --no-cache python3
# Ensure pip
RUN python3 -m ensurepip && rm -r /usr/lib/python*/ensurepip
# Upgrade pip
RUN pip3 install --upgrade pip setuptools
# Clean up
RUN rm -r /root/.cache
docker build -t alpine-python .
docker run -it alpine-python
Intended as base image.
FROM moppermonster/alpine-python
COPY app.py /app.py
CMD /usr/bin/python3 /app.py
For those who want to use the interactive Python3 shell run the following:
docker run -it moppermonster/alpine-python