Docker Specifying a hostname


Example

By default, containers created with docker run are given a random hostname. You can give the container a different hostname by passing the --hostname flag:

docker run --hostname redbox -d ubuntu:14.04