Skip to content

subject of email notifications inconsistent across hosts/docker installs #1047

Answered by piksel
glc650 asked this question in Q&A
Discussion options

You must be logged in to vote

Watchtower uses the hostname that the environment supplies. Docker normally sets the hostname based on the UTS. My guess is that it uses host networking on one of the instances perhaps?

You can supply the hostname when starting a container with the --hostname argument (and optionally use $(hostname) to get the current systems hostname):

docker run -d \
  --hostname "$(hostname)"
  --name watchtower \
  -v /var/run/docker.sock:/var/run/docker.sock \
  containrrr/watchtower

Refer to the docker run docs.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by glc650
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #1046 on August 06, 2021 17:01.