Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Learn Docker/Volumes and Local Development/Volumes -- Duplicate line of information #876

Open
juanchax opened this issue Nov 23, 2024 · 0 comments

Comments

@juanchax
Copy link

  • The paragraph above and below the code block are exactly the same except for the beginning. It feels like just one of the two would be enough(?)

Volumes

A Docker container has no built in persistence. Beyond the image itself, all other data is discarded when a container is destroyed. Without volumes, running databases or applications that require state would be impossible.

Volumes provide a persistent storage mechanism that can be managed through Docker’s CLI. They can be shared between multiple containers and can be stored on remote hosts or cloud providers.

The following creates < a volume called my-vol and on container creation is mounted to the /data directory. As the application runs, the contents of /data are persisted in the volume so that when the container is destroyed, the data is not lost. >

docker volume create my-vol
docker run -v my-vol:/data my-image

The above commands create < a volume called my-vol and on container creation is mounted to the /data directory. As the application runs, the contents of /data are persisted in the volume so that when the container is destroyed, the data is not lost. >

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant