netshoot icon indicating copy to clipboard operation
netshoot copied to clipboard

Can you please not set the `HOSTNAME` environment variable in the Dockerfile?

Open avbenavides opened this issue 6 months ago • 0 comments

This is a request. Can you please not set the HOSTNAME environment variable in the Dockerfile? A non-written convention in the K8s and Docker world is that the HOSTNAME environment variable value is the container or host ID. The netshoot Dockerfile breaks this convention by setting the HOSTNAME variable to "netshoot". The uniqueness of HOSTNAME is used (that I've seen) for:

  • Identifying the container in logs
  • Uniqueness in metrics
  • Other scripting that requires uniqueness that survives reboots/restarts (i.e. depending on the life-cycle, the container may be restarted in case of crash/fail exit code).

avbenavides avatar Aug 08 '24 07:08 avbenavides