Add a running container to traefik

Hi all

I have a running container XYZ that is listen on the port 4555. What I would like to do it, to apply into the traefik routing. For example, an incoming request www.example.org will be redirect to XYZ:4555 container without restarting to container.

Thanks

You'd have to use the file provider to achieve that.

You could also just start a new instance of the container to run behind traefik. Then if you still need 4555 available move 4555 to Traefik as well at your pleasure.

Thanks for answer.
I am using Docker as provider. A question, about file provider, you mean traefik.toml file or as I use Docker as Provider, the label definition on the container like:

  whoami:
    image: "containous/whoami"
    container_name: "simple-service"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
      - "traefik.http.routers.whoami.entrypoints=web"

When I have a running container, do I have to start a new container instance right? It is not possible to apply a running container to traefik right?

Thanks

No you cannot update the label on a running container.

File provider. You would have to enable that as an additional provider for traefik. You can use a file or directory of files(toml or yaml).