- listings/exercises/ex05-ex15: alle Übungsdateien für Tag 2 (Networking, Bind Mounts, Volumes, Env Variables, Compose, Build, Push, Registry) - setup/setup-ubuntu2404.sh: Prep-Script für Ubuntu 24.04 (Noble) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
374 B
Bash
Executable file
14 lines
374 B
Bash
Executable file
#!/bin/bash
|
|
# Exercise 7 — Named Volumes (shared between containers)
|
|
|
|
podman volume create pizza
|
|
|
|
# Terminal 1: write dates into the volume
|
|
podman run -v pizza:/data --rm -ti busybox \
|
|
sh -c 'while true; do sleep 1; date >> /data/output; done'
|
|
|
|
# Terminal 2: watch the output
|
|
podman run -v pizza:/data --rm busybox tail -f /data/output
|
|
|
|
# Cleanup
|
|
podman volume rm pizza
|