exercises: reader --name, ex13 commands.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Frank Engel 2026-05-20 16:03:08 +02:00
parent 5aba4ecac2
commit 5ad7435542
3 changed files with 17 additions and 6 deletions

View file

@ -5,9 +5,9 @@
podman run -d --name writer -v /tmp:/data busybox \ podman run -d --name writer -v /tmp:/data busybox \
sh -c 'while true; do sleep 1; date >> /data/output; done' sh -c 'while true; do sleep 1; date >> /data/output; done'
# Terminal 2: watch the output (Ctrl+C to exit) # Terminal 2: watch the output (Ctrl+C to exit, or: podman stop reader)
podman run --rm -v /tmp:/data busybox tail -f /data/output podman run --name reader -v /tmp:/data busybox tail -f /data/output
# Cleanup # Cleanup
podman stop writer && podman rm writer podman stop writer reader && podman rm writer reader
rm -f /tmp/output rm -f /tmp/output

View file

@ -7,9 +7,9 @@ podman volume create pizza
podman run -d --name writer -v pizza:/data busybox \ podman run -d --name writer -v pizza:/data busybox \
sh -c 'while true; do sleep 1; date >> /data/output; done' sh -c 'while true; do sleep 1; date >> /data/output; done'
# Terminal 2: watch the output (Ctrl+C to exit) # Terminal 2: watch the output (Ctrl+C to exit, or: podman stop reader)
podman run --rm -v pizza:/data busybox tail -f /data/output podman run --name reader -v pizza:/data busybox tail -f /data/output
# Cleanup # Cleanup
podman stop writer && podman rm writer podman stop writer reader && podman rm writer reader
podman volume rm pizza podman volume rm pizza

View file

@ -0,0 +1,11 @@
#!/bin/bash
# Exercise 13 — Multi-stage Build
# Build
podman build -t hello:latest .
# Run
podman run --rm hello:latest
# Inspect image size
podman images hello:latest