Start web-1 and web-2 from the same container image.
Which relationship is correct?
An image is a mostly read-only runtime template. Multiple containers can be created from it, each with its own writable layer and state.
Detailed explanation
Incorrect. An image is not a process ID.
Incorrect. Separate containers do not automatically share writable state.
Incorrect. Stopping a container does not delete its source image.
Correct. One image can be the template for multiple running containers.
Try it yourself
An example you can run in a temporary verification environment.
docker image --help 2>/dev/null || trueExpected result
Dockerがある場合はimage管理help。daemonへ接続しないKey points
- Image
- Container instance
- Writable layer
Notes
- Environment: Docker CLIが存在する場合のみhelp表示
- Use a disposable VM or container when validating lifecycle commands.
- Exact command output can vary slightly by distribution and runtime version.
Foundation review
Identify the layer
Image lifecycle and container lifecycle are separate; persistent application data normally belongs in a volume or external store.
Check the side effect
Inspect image and container identifiers separately before removing objects or deciding where data should persist.