Build, Run and test Python Flask app.
This workflows actions will run on push or pull requests.
run: docker pull lvthillo/python-flask-docker
run: docker run --name my-container -d -p 8080:8080 lvthillo/python-flask-docker
run: docker build . --file Dockerfile
I used curl command that display a web page with the host name an ip address.
run: curl http://localhost:8080/
run: docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-container
This command display the ip address of the docer that is the same as the app web page shows.
run: docker inspect -f '{{ .Config.Hostname }}' my-container
This command display the host name of the docer that is the same as the app web page shows.