Dockerized python-eve
- Alpine Linux
- dumb-init
- gosu
python2
orpython3
depending on the tag you choose
2.7
: (2.7.12/Dockerfile)3.5
: (3.5.2/Dockerfile)
Pull it from the official docker registry:
docker pull nicolaevladescu/python-eve:<tag>
Test that python is installed and working:
docker run --rm --name python-eve nicolaevladescu/python-eve:2.7 python --version
The default CMD
runs a python main.py
from /src
.
You can mount a folder from the host to /src
and run it with the default CMD
.
docker run --detach --volume $(pwd):/src --name python-eve nicolaevladescu/python-eve:2.7
Or run a file other than main.py
:
docker run --detach --volume $(pwd):/src --name python-eve nicolaevladescu/python-eve:2.7 python run.py
- Replace
gosu
withsu-exec
because it's only 10KB instead of 1.8MB.