How to build it
$ docker build . -t flask-in-docker
Run
$ docker run --rm -p 5000:5000 flask-in-docker
See output
Go to : localhost:5000
You will see:
Hello Flask World!
Also you can see the output on console using curl
$ curl http://localhost:5000
You will need an account with Docker Hub
$ docker build . -t flask-in-docker
Tag it with your username. Let's say your dockerhub username is XYZ. Replace XYZ below with your username
$ docker tag flask-in-docker XYZ/flask-in-docker
Login to docker hub
$ docker login
# enter your credentials
And push the image
$ docker push XYZ/flask-in-docker
Login to your dockerhub and verify the image is pushed in