Change wrong hostname container

I am running traefik 1.7.12 with docker (compose). I installed several docker images with succes. But with the latest I got the hostname label wrong in the docker-compose file. Instead of Hostname:container.mydomain.com I used Hostname.container.mydomain.com

In the next part you need to change _ to . Forum is complaining about two links max.

Now Traefik generated the domain containter_username_mydomain_com. I removed the docker-container and changed the line to hostname:container_mydomain_com and reinstalled the container. After the install traefik still shows the wrong domein (container_username_mydomain_com).

How can I change the frontend domain to the right domain name. Portainer shows the right domain, but traefik doesn't resolve.

Hello @marnixk,

From the docker documentation:
(https://docs.docker.com/engine/reference/run/#network-settings)

As such --hostname and --domainname are allowed in host network mode and will only change the hostname and domain name inside the container

Setting the hostname on your docker compose file has no effect on how traefik treats it, or handles routing.

If you would like to route by hostname, I would advise you try our quickstart guide, where we demonstrate host-based routing via docker labels:
(https://docs.traefik.io/#the-traefik-quickstart-using-docker)

I have the labels set in the docker compose file:
labels:
- traefik.backend=container
- traefik.frontend.rule=Host:container.home.domain.com

But it still show and listens to container.marnix.domain.com

added the line again, and now its updated, don't know why it didn't work earlier but its fixed