container-schulung/listings/exercises/ex08-persistence/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

17 lines
477 B
Text

# Exercise 8 — Volume Persistence (data survives container removal)
podman volume create pasta
# Create a file inside the container
podman run -v pasta:/data --name pasta --rm -ti busybox \
sh -c 'touch /data/hello && echo "file created"'
# Container is gone — volume still exists
podman volume inspect pasta
# New container, same volume (different mountpoint)
podman run -v pasta:/mnt --name pasta2 --rm -ti busybox \
ls -la /mnt
# Cleanup
podman volume rm pasta