@cryptotaxi247 / netdata-1 / commits / 0e2033c74

Add info for Docker containers about using hostname from host. (#13685)

* Add info for Docker containers about using hostname from host. By directly mounting `/etc/hostname` into the container read-only. * Update packaging/docker/README.md Co-authored-by: DShreve2 <david@netdata.cloud> * Update packaging/docker/README.md Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> Co-authored-by: DShreve2 <david@netdata.cloud> Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Austin S. Hemmelgarn committed Sep 30, 2022 at 09:17 UTC 0e2033c743163f9b1193666a8d7e04e28ea2fc2d
1 file changed +5
packaging/docker/README.md
+5
@@ -252,6 +252,11 @@ If you don't want to destroy and recreate your container, you can edit the Agent
252 above section on [configuring Agent containers](#configure-agent-containers) to find the appropriate method based on
253 how you created the container.
254
255 +Alternatively, you can directly use the hostname from the node running the container by mounting
256 +`/etc/hostname` from the host in the container. With `docker run`, this can be done by adding `--volume
257 +/etc/hostname:/etc/hostname:ro` to the options. If you are using Docker Compose, you can add an entry to the
258 +container's `volumes` section reading `- /etc/hostname:/etc/hostname:ro`.
259 +
260 ### Add or remove other volumes
261
262 Some volumes are optional depending on how you use Netdata: