Caveats to "Traefik 2.0 & Docker 101"

Hi all,

yesterday I migrated from 1.7 to 2.0 using which went mainly really good.

I had to navigate around two issues which I want to share here to maybe save somebody some headaches:

  1. Redirect of all HTTP to HTTPS
    I deviated from the docker compose file of the blog post in that I disabled automatic exposure of all docker containers by setting "providers.docker.exposedbydefault" to false. The redirection did not work at first until I enabled traefik on the traefik container itself (traefik.enable=true). That makes sense but maybe if traefik sees labels starting with "traefik." on a container that is not enabled it should maybe print a warning.
  2. Reusing acme.json
    I assumed that I could use the acme.json file cert file generated by 1.7 in 2.0 to avoid getting a new certificate from Let's encrypt. That was not the case and I got an error message from 2.0. I ended up starting 2.0 with a fresh certificate as I could not determine the differences between the two files. Maybe somebody with knowledge could elaborate on as to what the format differences are and how to reuse the cert between 1.7 and 2.0.

Hth, MadEagle


the blog post only speak about v2.

If you find a migration guide: