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

Author: Michal Zuber

Full stack developer, biker and rollerblader. Owner and developer at https://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s