Compare commits
14 Commits
cf9c01b06a
...
main
Author | SHA1 | Date | |
---|---|---|---|
8ee13fd2e1 | |||
9add5b2f82 | |||
eab930b1f2 | |||
e9e49b46f2 | |||
2d8c9d637c | |||
dce3933c9e | |||
c7db1c59ac | |||
d3a4ad6bb2 | |||
cd463bf5a5 | |||
62ec30984e | |||
422c1b3126 | |||
c09cb3d374 | |||
825fac41b1 | |||
092f821553 |
@ -2,7 +2,7 @@ FROM nginx:1.29.0
|
||||
|
||||
COPY entrypoint.sh /custom-docker-entrypoint.sh
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
COPY index.html /usr/share/nginx/html/index.html.tmpl
|
||||
|
||||
RUN ["chmod", "a+x", "/custom-docker-entrypoint.sh"]
|
||||
|
||||
|
@ -1,8 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Docker Debugging Disco – Challenge ${CHALLENGE}</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🪩</text></svg>">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Far out! Challenge ${CHALLENGE} complete 🕺</h1>
|
||||
<p>
|
||||
Now head back to your terminal where you ran `docker compose up`, hit <code>Ctrl+C</code>, then run <code>docker compose down</code>… and move on to the next challenge!
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
11
1/docker-compose.yml
Normal file
11
1/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
# Nice and simple, this challenge just tests that things are working correctly.
|
||||
|
||||
services:
|
||||
app:
|
||||
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0
|
||||
ports:
|
||||
- 8000:80
|
||||
environment:
|
||||
- CHALLENGE=1
|
||||
|
12
2/docker-compose.yml
Normal file
12
2/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
# TIP: Where can we see a list of valid image tags (versions?).
|
||||
# TIP: Check on git.autonomic.zone -- don't peek at challenge 1!
|
||||
|
||||
services:
|
||||
app:
|
||||
image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.2.0
|
||||
ports:
|
||||
- 8000:80
|
||||
environment:
|
||||
- CHALLENGE=2
|
||||
|
11
3/docker-compose.yml
Normal file
11
3/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
# TIP: Where can we see a list of valid image repos (names)?
|
||||
# TIP: Check on git.autonomic.zone -- don't peek at challenge 1 or 2!
|
||||
|
||||
services:
|
||||
app:
|
||||
image: git.autonomic.zone/autonomic-cooperative/disco:0.1.0
|
||||
ports:
|
||||
- 8000:80
|
||||
environment:
|
||||
- CHALLENGE=3
|
17
4/docker-compose.yml
Normal file
17
4/docker-compose.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
# TIP: Little more complex, now we have a "custom entrypoint", a script that runs whenever the container starts
|
||||
# TIP: Do you notice anything wrong with any of the entrypoint lines?
|
||||
|
||||
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: entrypoin.sh
|
5
4/entrypoint.sh
Executable file
5
4/entrypoint.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CHALLENGE=4
|
||||
|
||||
/custom-docker-entrypoint.sh
|
16
5/docker-compose.yml
Normal file
16
5/docker-compose.yml
Normal 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
5
5/entrypoint.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CHALLENGE=5
|
||||
|
||||
/custom-docker-entrypoint.sh
|
16
6/docker-compose.yml
Normal file
16
6/docker-compose.yml
Normal 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
5
6/entrypoint.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CHALLENGE=6
|
||||
|
||||
/custom-docker-entrypoint.sh
|
35
7/docker-compose.yml
Normal file
35
7/docker-compose.yml
Normal 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
14
7/traefik.yml
Normal 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
35
8/docker-compose.yml
Normal 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
14
8/traefik.yml
Normal 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
33
9/docker-compose.yml
Normal 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
14
9/traefik.yml
Normal 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.
|
@ -6,9 +6,9 @@ Bust some docker troubleshooting moves 🕺
|
||||
|
||||
- [ ] [Install Docker](https://docs.docker.com/engine/install/)
|
||||
- [ ] Clone this repository
|
||||
- [ ] Make sure you have ~1GB free disk space
|
||||
- [ ] Make sure you have ~100MB free disk space
|
||||
|
||||
## Start the jam
|
||||
## Start the jam
|
||||
|
||||
Each numbered subfolder contains a funky docker challenge.
|
||||
|
||||
@ -22,3 +22,7 @@ docker compose up
|
||||
```
|
||||
|
||||
NOTE: if you get a Docker error message running `docker compose`, you might be on a vintage version of Docker – no worries, either update if possible, or [install Docker Compose Standalone](https://docs.docker.com/compose/install/standalone/) and run `docker-compose` (with a hyphen) instead
|
||||
|
||||
## Trouble on the dancefloor?
|
||||
|
||||
Check out `docker-compose.yml` in each challenge directory for hints.
|
||||
|
Reference in New Issue
Block a user