Traefik test drive Docker container discovery

Simple config for testing Traefik with Docker:

# traefik.toml
debug = true

[api]
entryPoint = 'traefik'
debug = true

[docker]
endpoint = 'unix:///var/run/docker.sock'
domain = 'docker.localhost'
watch = true

Run Traefik in a docker container:

docker run --rm -l traefik -p 8080:8080 -p 80:80 \
    -v $PWD/traefik.toml:/etc/traefik/traefik.toml \
    -v /var/run/docker.sock:/var/run/docker.sock traefik

Fire up one docker compose setup and visit http://localhost:8080

Advertisements