A Python web app, running on port 5000, which prints data from a linked container.
8.0K
This is a sample Python web application, running on port 5000,
which prints data retrieved from the linked carinamarina/hello-world-app container.
Run the carinamarina/hello-world-app container.
docker run --detach --name app carinamarina/hello-world-app
Run the carinamarina/hello-world-web container, linking to the app container using
the alias helloapp.
docker run --detach --name web --link app:helloapp --publish-all carinamarina/hello-world-web
Identity the port where the web container was published. In the example below, the port is 32770.
$ docker port web
5000/tcp -> 0.0.0.0:32770
Open http://<dockerHost>:<appContainerPort>, for example http://localhost:32770. You should see the following output:
The linked container says ... "Hello World!"
Content type
Image
Digest
sha256:68eec9021…
Size
257.2 MB
Last updated
about 10 years ago
docker pull carinamarina/hello-world-web