ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 116 - DCA discussion

Report
Export

Is this statement correct?

Solution. A Dockerfile stores persistent data between deployments of a container

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= A Dockerfile does not store persistent data between deployments of a container. A Dockerfile is a text document that contains instructions for building a Docker image. A Docker image is a read-only template that defines the layers and configuration of a container. A Docker container is an isolated and ephemeral instance of a Docker image that runs on the Docker Engine. Docker containers are not meant to store persistent data, as any changes made to the container's filesystem are lost when the container is removed. To store persistent data between deployments of a container, you need to use volumes or bind mounts. Volumes and bind mounts are ways to attach external storage to a container, so that the data is preserved even if the container is deleted. Volumes are managed by Docker and stored in a location on the host system that is independent of the container's lifecycle. Bind mounts are files or directories on the host system that are mounted into a container.Reference:

Persist container data

Dockerfile reference

Docker MySQL Persistence

Persist the DB

Docker - Dockerfile, persist data with VOLUME

asked 08/11/2024
Zahid Maqsood
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first