Created
April 29, 2020 19:42
-
-
Save joalbertg/e041beb51e440dbf627ecb8bfb792b9b to your computer and use it in GitHub Desktop.
docker: alphine-python3
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
| # By: https://github.com/Docker-Hub-frolvlad | |
| FROM alpine:3.11 | |
| # This hack is widely applied to avoid python printing issues in docker containers. | |
| # See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13 | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN echo "**** install Python ****" && \ | |
| apk add --no-cache python3 && \ | |
| if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \ | |
| \ | |
| echo "**** install pip ****" && \ | |
| python3 -m ensurepip && \ | |
| rm -r /usr/lib/python*/ensurepip && \ | |
| pip3 install --no-cache --upgrade pip setuptools wheel && \ | |
| if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment