CS FundamentalsHardAccenture · Product placement
An engineer runs docker exec into a running container, edits a config file, and later the container is removed and recreated from the same image. What happens to the edit?
- A. It is lost, because changes live in the container's writable layer; persistent data belongs in a volume and config changes belong in the image or the environment
- B. It is kept, because Docker commits changes automatically
- C. It is copied into the image
- D. It survives only if the container was stopped gracefully
Correct answer: A. It is lost, because changes live in the container's writable layer; persistent data belongs in a volume and config changes belong in the image or the environment
Containers are meant to be disposable: the writable layer dies with the container. Treating containers as immutable and rebuilding from versioned definitions avoids snowflake servers.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A pipeline builds the application separately for each environment (dev, QA, prod) from the same commit. Which principle does this break…
- According to the Twelve-Factor App methodology, where should a service keep its database URL and API keys that differ between staging and…
- A CI pipeline takes 40 minutes: end-to-end UI tests (30 min) run first, then unit tests (3 min), then linting (1 min). Most failures are…
- A service's SLO is 99.9% of requests succeeding over a 30-day window. For a downtime-based view, what is the monthly error budget in…
- A service has a 99.9% success SLO over 30 days. An incident causes a steady 0.5% error rate. If it continues, how soon will the whole…
- A Kubernetes HorizontalPodAutoscaler targets 60% average CPU. There are 4 pods averaging 90% CPU. The HPA uses desired = ceil(current…