Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker exposedbydefault = false didn't work #663

Closed
mcoms opened this issue Sep 4, 2016 · 10 comments
Closed

Docker exposedbydefault = false didn't work #663

mcoms opened this issue Sep 4, 2016 · 10 comments

Comments

@mcoms
Copy link

mcoms commented Sep 4, 2016

With the following traefik.toml and Traefik v1.0.2 (official docker image), all my docker containers are exposed, despite setting exposedbydefault = false.

defaultEntryPoints = ["https"]

[acme]
email = "domains@example.com"
storageFile = "/etc/traefik/acme.json"
entryPoint = "https"
onDemand = false
OnHostRule = true

[entryPoints]
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[retry]

[web]
address = ":8080"

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "docker.localhost"
watch = true
exposedbydefault = false
@gaetancollaud
Copy link

I have the same issue, I had to put the label traefik.enable=false to hide some containers.

@thomasf
Copy link

thomasf commented Sep 9, 2016

I think that feature hasnt made it into any release version yet

@mcoms
Copy link
Author

mcoms commented Sep 9, 2016

Ah yes, you're quite right. Sorry!

@bernhardberger
Copy link

bernhardberger commented May 4, 2018

Somehow this still doesn't work with either 1.5 or 1.6.

Pretty annoying if you have tons of projects up.. :/

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "mydomain.tld"
watch = true
exposedbydefault = false

still creates a frontend and backend for any container started...

@ldez ldez added this to the 1.0 milestone May 4, 2018
@ldez
Copy link
Member

ldez commented May 4, 2018

@bernhardberger come on Slack to explain your issue.

@bernhardberger
Copy link

bernhardberger commented May 4, 2018 via email

@Pyton
Copy link

Pyton commented May 8, 2018

@bernhardberger can you explain what was the issue? I have the same problem.
My toml:

[docker]
endpoint = "unix:///var/run/docker.sock"
watch = true
exposedbydefault = false

but in debug logs there is "ExposedByDefault":true, and i have to add traefik.enable: false labels

@bernhardberger
Copy link

bernhardberger commented May 8, 2018 via email

@ldez
Copy link
Member

ldez commented May 8, 2018

https://docs.traefik.io/v1.6/basics/#static-trfik-configuration

It means that arguments override configuration file, and key-value store overrides arguments.

the provider-enabling argument parameters (e.g., --docker) set all default values for the specific provider.
It must not be used if a configuration source with less precedence wants to set a non-default provider value.

To summary, don't mix CLI arguments and TOML on the same configuration section (ex: docker)

@ldez ldez removed this from the 1.0 milestone May 8, 2018
@ldez ldez added the kind/question a question label May 8, 2018
@Pyton
Copy link

Pyton commented May 8, 2018

Yeeeyyy... I had in docker-compose.yml
command: --api --docker
and after remove that it starts working !!

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants