Dockerfile For Python, Alpine, and OpenJDK
Mar 28, 2021
Here’s a Dockerfile that:
- Starts with Alpine 3.12 and OpenJDK 15
- Installs Python 3.9.1 using pyenv
- Updates Alpine packages and removes the ones that are only needed for installing Python
- Runs a Python program when the container starts using the user ‘appuser’ instead of root