Public Repository

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Full description is empty for this repo.

Docker Pull Command
Owner
sirishadocker

Comments (2)
sirishadocker
a year ago

The commands used for building,tagging and pushing the image were -

  1. docker build -t sirishadocker/flaskwebserver:flaskws1 .
    2 For tagging, the above command is the one used, the flaskws1 is the tag

  2. For pushing the docker image to the hub,
    docker push sirishadocker/flaskwebserver

sirishadocker
a year ago

The flask web server should be started as follows -

docker pull sirishadocker/flaskwebserver:flaskws1.
docker run -i -t sirishadocker/flaskwebserver:flaskws1

Open a second terminal and do the following -
docker ps
you should see something like this -

sirishas-MBP:testContainer sg$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
021736ab572c sirishadocker/flaskwebserver:flaskws1 "/bin/bash" 16 seconds ago Up 15 seconds 5000/tcp jovial_pare

Now note the container name "jovial_pare" or whatever appears on the terminal output
and then do the following -

sirishas-MBP:testContainer sg$ docker inspect jovial_pare | grep "IPA"
"SecondaryIPAddresses": null,
"IPAddress": "172.17.0.2",
"IPAMConfig": null,
"IPAddress": "172.17.0.2",

Copy the IPAddress
and do the following -
Paste in the address field of the web browser -
http://172.17.0.2:5000/

You should see the output "Hello World" on the screen.