docker:assign_a_hostname_to_the_container
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker:assign_a_hostname_to_the_container [2017/02/22 16:25] – created peter | docker:assign_a_hostname_to_the_container [2020/05/13 08:27] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Docker - Assign a hostname to the container ====== | ||
- | |||
- | The value supplied to the **--hostname** command is set inside **/ | ||
- | |||
- | <code bash> | ||
- | docker run --hostname=value | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | <code bash> | ||
- | docker run -h value | ||
- | </ | ||
- | |||
- | |||
- | While **--name** and **--hostname** are both useful for identification of containers, sometimes, it's not about naming the container at all. Rather, it's about having a container clean up after itself without having to remember to do it yourself. | ||
docker/assign_a_hostname_to_the_container.1487780734.txt.gz · Last modified: 2020/07/15 09:30 (external edit)