Files
Schulung_Docker_k8s/example_start_treafik
2022-12-13 09:19:15 +01:00

15 lines
711 B
Plaintext

cnbc-LG-0815!
htpasswd -nBC 10 test
docker run -d -p 8080:8080 -p 80:80 \
--label "traefik.enable=true" \
-v $PWD/traefik-api.yml:/etc/traefik/traefik.yml \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--label "traefik.http.routers.dashboard.rule=Host(\`traefik.docker.local\`) && (PathPrefix(\`/api\`) || PathPrefix(\`/dashboard\`))" \
--label "traefik.http.routers.dashboard.service=api@internal" \
--label "traefik.http.routers.dashboard.middlewares=auth" \
--label 'traefik.http.middlewares.auth.basicauth.users=test:$2y$10$/buNijLGE3X18RmxOjx8BuY97zXwZtGIFkXwniOh2zbau.IRJYdwC' \
--label "traefik.http.routers.dashboard.entrypoints=http" \
--name traefik --rm traefik:v2.9.1