2
After mounting the Docker-Compose.yml as follows:
version: '3'
services:
proxy:
image: traefik
command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
networks:
- webgateway
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
networks:
webgateway:
driver: bridge
I try to start the container with the command:
docker-compose up
But I get the following error message:
Creating network "traefik_webgateway" with driver "bridge"
Creating traefik_proxy_1 ... done
Attaching to traefik_proxy_1
proxy_1 | 2019/09/23 00:18:38 command traefik error: invalid node traefik: no child
traefik_proxy_1 exited with code 1
I tried to create a file called traefik.toml to mirror to the container with the following content:
# traefik.toml
logLevel = "DEBUG"
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
But I also made the mistake:
Creating network "traefik_webgateway" with driver "bridge"
Creating traefik_proxy_1 ... done
Attaching to traefik_proxy_1
proxy_1 | 2019/09/23 00:23:55 command traefik error: read /traefik.toml: is a directory
traefik_proxy_1 exited with code 1
I have tried several times to start traefik but all without success. Follow this tutorial from Digital Ocean and I also got the error:
2019/09/23 00:16:46 command traefik error: field not found, node: entrypoint
NOTE: I tried in 4 different machines, every time getting similar errors:
- On Windows with Docker desktop
- On Ubuntu from WSL (On windows)
- On Ubuntu 18 clean on a machine created on Amazon AMI
- On a machine preconfigured by BITNAMI with MEAN stack
did you ever get a look at this recipe here? -> https://hub.docker.com/_/traefik
– Caio Augusto Papai