# Guided Exercise: Predict What Survives Before You Test It This is a paper exercise — commit to predictions before working in the Lab. ## Your task For each scenario, predict whether the data survives a `docker rm -f` followed by recreating a container with the same name and image: 1. Data written to `/tmp/file.txt` inside a container with no volumes configured. 2. Data written to `/data/file.txt`, where `/data` is mounted from a named volume. 3. Data written to `/data/file.txt` in scenario 2, but this time you ALSO run `docker volume rm ` before recreating the container. ## A worked shape to check yourself against 1. Lost — no volume, so it lived only in the disposable writable layer. 2. Survives — the volume itself is untouched by the container's destruction, and the new container reattaches to the same volume. 3. Lost — the volume itself was explicitly deleted, not just the container. Persistence depends on the VOLUME surviving, not just avoiding container destruction. ## Instructor Notes **Facilitation:** Item 3 is the important trick question — students who've internalized "volumes always persist" without qualification should be corrected here: the volume itself can still be deleted deliberately. **Approximate timing:** 8-10 minutes live discussion; 5 minutes self-paced.