Docker Windows Compose Traefik

Hej,

I am trying to install Traefik on my docker system (Docker for Windows with gui and Portainer). Now I should create the traefik.yml and transfer it via volumes.

This is what the tutorial says:

volumes:
  - ./data/traefik.yml:/traefik.yml:ro

I tried to create a volume called traefik

    volumes:
      traefik:

Path in the Windows machine to the Volumes folder:

\\wsl$\docker-desktop-data\data\docker\volumes

How can I retrieve the traefik.yml file in this volume now? Unfortunately, that's not how it works:

volumes:
   - traefik/traefik.yml:/traefik.yml:ro

Best regards

I recommend to check the Docker docs for volumes and Docker Compose docs for volumes for an explanation of the difference and how to use it.