Interview practice question
Database data disappears when the container is recreated
Cloud & DevOps · Docker · Beginner
You run PostgreSQL in a container for development, and all data vanishes every time you recreate the container. Why, and how do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Data written to container writable layer.
- Removed with container.
- Mount named volume at data directory.
- Compose volumes section.
- Back up volumes if important.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.