- Solved
- Minor
I have been using
&& docker network connect proxynet traefik
in the docker "Post Arguments" field to connect my traefik container to an additional docker network after it is booted. It has been working great since forever.
Since enabling tailscale on the container, I notice the docker run command sets this as an environment variable for the container
With tailscale disabled this is the output from the update container screen:
docker run
-d
--name='traefik'
--net='br0.11'
--ip='172.16.11.223'
--ip6='REDACTED::223'
--pids-limit 2048
-e TZ="Australia/Sydney"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="Cerebro"
-e HOST_CONTAINERNAME="traefik"
-e 'TCP_PORT_443'='44301'
-e 'TCP_PORT_80'='8001'
-e 'TCP_PORT_8080'='8183'
-e 'CF_DNS_API_TOKEN'='REDACTED'
-e 'traefik.http.routers.api.insecure'='true'
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui='http://[IP]:[PORT:8080]/'
-l 'traefik.http.routers.api.entryPoints'='https'
-l 'traefik.http.routers.api.service'='api@internal'
-l 'traefik.enable'='false'
-v '/mnt/user/appdata/traefik':'/etc/traefik':'rw'
-v '/var/run/docker.sock':'/var/run/docker.sock':'rw' 'traefik:latest' && docker network connect proxynet traefik
And with tailscale enabled:docker run
-d
--name='traefik'
--entrypoint='/opt/unraid/tailscale'
--net='br0.11'
--ip='172.16.11.223'
--ip6='REDACTED::223'
--pids-limit 2048
-e TZ="Australia/Sydney"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="Cerebro"
-e HOST_CONTAINERNAME="traefik"
-e 'TCP_PORT_443'='44301'
-e 'TCP_PORT_80'='8001'
-e 'TCP_PORT_8080'='8183'
-e 'CF_DNS_API_TOKEN'='REDACTED'
-e 'traefik.http.routers.api.insecure'='true'
-e TAILSCALE_HOSTNAME='traefik'
-e TAILSCALE_USE_SSH='false'
-e TAILSCALE_USERSPACE_NETWORKING='true'
-e TAILSCALE_STATE_DIR='/etc/traefik/.tailscale_state'
-e ORG_POSTARGS='&& docker network connect proxynet traefik'
-e ORG_ENTRYPOINT="/entrypoint.sh"
-e ORG_CMD="traefik"
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui='http://[IP]:[PORT:8080]/'
-l 'traefik.http.routers.api.entryPoints'='https'
-l 'traefik.http.routers.api.service'='api@internal'
-l 'traefik.enable'='false'
-l net.unraid.docker.tailscale.webui='http://[noserve]:8080/'
-l net.unraid.docker.tailscale.hostname='traefik'
-v '/mnt/user/appdata/traefik':'/etc/traefik':'rw'
-v '/var/run/docker.sock':'/var/run/docker.sock':'rw'
-v '/usr/local/share/docker/tailscale_container_hook':'/opt/unraid/tailscale' 'traefik:latest'
You can see that it changes the post arguments to an environment variable with:
-e ORG_POSTARGS='&& docker network connect proxynet traefik'