# Exercise 7 — Named Volumes (shared between containers)

podman volume create pizza

# Terminal 1: write dates into the volume (detached)
podman run -d --name writer -v pizza:/data busybox \
  sh -c 'while true; do sleep 1; date >> /data/output; done'

# Terminal 2: watch the output (Ctrl+C to exit, or: podman stop reader)
podman run --name reader -v pizza:/data busybox tail -f /data/output

# Cleanup
podman stop writer reader && podman rm writer reader
podman volume rm pizza
