hello-docker

command module
v0.0.0-...-56f0fc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

"Hello, Docker!" container

Build Status Docker Automated buil

This Docker container is just a Hello, world! example to practice with containers in general. This container is useful to demonstrate routing capabilities, since, by default, it prints the Hostname instead of the word world, so when ran in a container, it'll be the Container ID.

When load-balanced, the ID will jump between the different containers where the request is being offloaded.

You can change two settings: the port the container will be listening at, which is managed by the $PORT environment variable, and the name you want to be printed to the screen, in this case, managed by the $NAME environment variable.

Container published to the docker registry

The docker container is published in the public Docker Registry under patrickdappollonio/hello-docker, you can pull it by executing:

docker pull patrickdappollonio/hello-docker

Then, to actually run it and print the Hostname, you'll do:

docker run -p 5000:8000 patrickdappollonio/hello-docker

Then just access 127.0.0.1:5000 in your browser to see the Hello, $NAME! message.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL