container-schulung/listings/exercises/ex17-update-cycle/commands.txt
Frank Engel b32d8c2472 exercises: ex16-19 hinzugefügt, commands.sh → commands.txt
- ex16: lokale Registry + VisitCounter pushen
- ex17: vollständiger Update-Zyklus (edit → build → push → restart)
- ex18: VisitCounter mit Quadlets deployen
- ex19: Container schrittweise härten (read-only, cap-drop, no-new-priv)
- alle commands.sh umbenannt in commands.txt, Shebang entfernt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 09:09:51 +02:00

18 lines
523 B
Text

# Exercise 17 — Full update cycle (edit → build → push → restart)
# 1. Change the page title in main.go
sed -i 's|<h1>VisitCounter</h1>|<h1>My Counter</h1>|' \
listings/visitcounter/app/main.go
# 2. Rebuild
cd listings/visitcounter/app
podman build -t localhost:5000/visitcounter:latest .
# 3. Push
podman push --tls-verify=false localhost:5000/visitcounter:latest
# 4. Restart the Quadlet service
systemctl --user restart visitcounter-app.service
# 5. Verify — new title should appear
curl localhost:8080