And I have this in the log of traffic, and it won't start
My docker file :
services:
traefik:
image: docker.io/library/traefik:v3.0.1
container_name: traefik
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config/traefik.yaml:/etc/traefik/traefik.yaml:ro
- ./config/conf/:/etc/traefik/conf/
- ./config/certs/:/etc/traefik/certs/
restart: unless-stopped
and we go to the mounted folder;
Docker creates a directory, and not a file ??
Someone can help me, please... It took 2hours to debug, and I did"t find the solution
Yes my file name is traefik.yml and on the config it is traefik.yaml, when I put it on the config .yml I have the same error
Are you using Docker Desktop on Windows? Note that it creates a VM to run Linux containers inside. Make sure your local config files are present inside that VM.
I use docker and portioner in my Debian LXC on my promox.
And even if my file name yml or yaml, it doesn't work, I thought the same thing..., but the problem isn't with the file name
You don't seem to understand. If you create a Docker bind mount with a non-existing file, Docker will assume you want to create a directory and will usually create a directory inside the container.
So if you use - ./config/traefik.yaml:/etc/traefik/traefik.yaml:ro and the file does not exist, then /etc/traefik/traefik.yamlcould be a directory inside. If Traefik tries to read traefik.yaml before traefik.yml, then it would fail with the error message.
Clean up your config, use 3 backticks before and after code/config. And be aware you tutorial is 2 years old, so probably made for Traefik v2. You try to use Traefik v3, which is a major release meaning some breaking changes.