ExamGecko
Question list
Search
Search

Question 40 - JN0-213 discussion

Report
Export

You have started a container in Docker, made configuration changes to it, and stopped the container. You notice the next time that you execute the docker run command, the changes have not persisted.

What is the problem?

A.
The docker load command must be used to persist the change.
Answers
A.
The docker load command must be used to persist the change.
B.
Docker images need to be recompiled to make any changes.
Answers
B.
Docker images need to be recompiled to make any changes.
C.
The docker run command starts a new copy of the container, not the existing version.
Answers
C.
The docker run command starts a new copy of the container, not the existing version.
D.
The docker exec command needs to be run first to save and exit the running container.
Answers
D.
The docker exec command needs to be run first to save and exit the running container.
Suggested answer: C

Explanation:

Docker containers are designed to be ephemeral, meaning they run based on their current configuration. When a Docker container is stopped, it does not automatically save changes made during its runtime. When you executedocker run, it starts a new instance of the container, not an existing version with its changes[14-16]. If you want to persist changes between runs, you need to commit changes to a new Docker image or use Docker volumes for data persistence[14-16]. Reference from Juniper site: Stack Overflow, Docker Docs

asked 18/09/2024
Johan Wu
27 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first