Compare commits

...

7 Commits

Author SHA1 Message Date
3wc
8ee13fd2e1 Fix URL for Traefik dashboard 2025-07-29 17:29:48 +01:00
3wc
9add5b2f82 Add challenge 9 2025-07-29 17:29:38 +01:00
3wc
eab930b1f2 Add challenge 8 2025-07-29 17:26:12 +01:00
3wc
e9e49b46f2 Enable traefik dashboard for 7 2025-07-29 17:25:55 +01:00
3wc
2d8c9d637c Add challenge 7 2025-07-29 17:17:09 +01:00
3wc
dce3933c9e Add challenge 6 2025-07-29 17:06:12 +01:00
3wc
c7db1c59ac Add challenge 5 2025-07-29 17:04:48 +01:00
10 changed files with 187 additions and 0 deletions

16
5/docker-compose.yml Normal file
View File

@ -0,0 +1,16 @@
---
# TIP: Why can't Docker run the entrypoint?
services:
app:
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0
ports:
- 8000:80
configs:
- source: custom_entrypoint
target: /custom-docker-entrypoint-2.sh
entrypoint: /custom-docker-entrypoint-2.sh
configs:
custom_entrypoint:
file: entrypoint.sh

5
5/entrypoint.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
export CHALLENGE=5
/custom-docker-entrypoint.sh

16
6/docker-compose.yml Normal file
View File

@ -0,0 +1,16 @@
---
# TIP: Why can't Docker find the entrypoint?
services:
app:
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0
ports:
- 8000:80
configs:
- source: custom_entrypoint
target: /custom-docker-entrypoint-2.sh
entrypoint: /custom-docker-entrypoint-3.sh
configs:
custom_entrypoint:
file: entrypoint.sh

5
6/entrypoint.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
export CHALLENGE=6
/custom-docker-entrypoint.sh

35
7/docker-compose.yml Normal file
View File

@ -0,0 +1,35 @@
---
# TIP: This is just a sense check, should run without errors. Complicating things slightly by adding a reverse proxy (this is how all co-op cloud services are hosting)
services:
app:
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0
environment:
- CHALLENGE=7
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.services.challenge-7.loadbalancer.server.port=80"
- "traefik.http.routers.challenge-7.rule=Host(`localhost`)"
networks:
proxy:
proxy:
image: traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
proxy:
configs:
- source: traefik_yml
target: /traefik.yml
ports:
- 8000:80
- 8080:8080
networks:
proxy:
configs:
traefik_yml:
file: traefik.yml

14
7/traefik.yml Normal file
View File

@ -0,0 +1,14 @@
api:
dashboard: true
insecure: true
debug: true
entryPoints:
web:
address: ":80"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
# exposedByDefault: false
network: proxy # Optional; Only use the "proxy" Docker network, even if containers are on multiple networks.

35
8/docker-compose.yml Normal file
View File

@ -0,0 +1,35 @@
---
# TIP: Why isn't Traefik routing correctly? Don't peek at challenge 7! Try checking the Traefik dashboard on http://localhost:8080/dashboard/
services:
app:
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0
environment:
- CHALLENGE=7
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.services.challenge-7.loadbalancer.server.port=8000"
- "traefik.http.routers.challenge-7.rule=Host(`localhost`)"
networks:
proxy:
proxy:
image: traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
proxy:
configs:
- source: traefik_yml
target: /traefik.yml
ports:
- 8000:80
- 8080:8080
networks:
proxy:
configs:
traefik_yml:
file: traefik.yml

14
8/traefik.yml Normal file
View File

@ -0,0 +1,14 @@
api:
dashboard: true
insecure: true
debug: true
entryPoints:
web:
address: ":80"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
# exposedByDefault: false
network: proxy # Optional; Only use the "proxy" Docker network, even if containers are on multiple networks.

33
9/docker-compose.yml Normal file
View File

@ -0,0 +1,33 @@
---
# TIP: Why isn't Traefik routing correctly? Don't peek at challenge 7 or 8! Try checking the Traefik dashboard on http://localhost:8080/dashboard/
services:
app:
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0
environment:
- CHALLENGE=7
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.services.challenge-7.loadbalancer.server.port=80"
- "traefik.http.routers.challenge-7.rule=Host(`localhost`)"
proxy:
image: traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
proxy:
configs:
- source: traefik_yml
target: /traefik.yml
ports:
- 8000:80
- 8080:8080
networks:
proxy:
configs:
traefik_yml:
file: traefik.yml

14
9/traefik.yml Normal file
View File

@ -0,0 +1,14 @@
api:
dashboard: true
insecure: true
debug: true
entryPoints:
web:
address: ":80"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
# exposedByDefault: false
network: proxy # Optional; Only use the "proxy" Docker network, even if containers are on multiple networks.