Displays
- $WELCOME_MSG
- Hostname
- $PID
export WELCOME_MSG="Hello World"
python hello-world.py
curl http://localhost:80
*** Python - Hello World ! ***
WELCOME_MSG : Hello World
Hostname is : <your-hostname>
Process ID : 98
Can be used to create a docker image and run within a container
docker build -t robertshand/python-hello-world .
docker run -d -p 80:80 -e WELCOME_MSG="Hello World" robertshand/python-hello-world
curl http://$(docker-machine ip default):80
Result is
*** Python - Hello World ! ***
WELCOME_MSG : Hello World
Hostname is : 9ffe7e421652
Process ID : 1%