Difference between revisions of "Docker Volumes"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
* <code>[[/var/lib/docker/]]volumes/metadata.db</code> | * <code>[[/var/lib/docker/]]volumes/metadata.db</code> | ||
− | |||
− | |||
{{docker volumes}} | {{docker volumes}} | ||
Line 20: | Line 18: | ||
* <code> [[docker run]] [[--name]] some-[[mariadb]] [[-v]] /my/own/datadir:[[/var/lib/mysql]] [[-e]] MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:latest</code> | * <code> [[docker run]] [[--name]] some-[[mariadb]] [[-v]] /my/own/datadir:[[/var/lib/mysql]] [[-e]] MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:latest</code> | ||
+ | |||
+ | |||
+ | |||
+ | * <code>cd /var/lib/docker/volumes/<volume_name>/_data</code> | ||
+ | |||
== Related terms == | == Related terms == |
Latest revision as of 13:51, 25 October 2024
/var/lib/docker/volumes/metadata.db
docker volume create --name VOLUME_NAME
docker volume ls
: https://docs.docker.com/engine/reference/commandline/volume_ls/docker volume rm VOLUME_NAME
docker volume
: https://docs.docker.com/engine/reference/commandline/volume/docker volume inspect VOLUME
: https://docs.docker.com/engine/reference/commandline/volume_inspect/docker inspect -f '{{ .Mounts }}' CONTAINER_NAME
docker volumes prune
docker system prune --volumes
docker container inspect grafana | grep -w Volumes "Volumes": null,
docker image inspect grafana/grafana | grep -w Volumes "Volumes": null, "Volumes": null,
docker run --name some-mariadb -v /my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:latest
cd /var/lib/docker/volumes/<volume_name>/_data
Related terms[edit]
docker system df -v
(-v show also volume information)- docker buildx du
- Docker images management:
docker images
- Docker-compose: volumes
docker run -v .../...
- bind mounts
docker inspect
Dockerfile
podman volume
--mount
Activitites[edit]
- Read Introduction to Docker Bind Mounts and Volumes https://4sysops.com/archives/introduction-to-docker-bind-mounts-and-volumes/
- Read https://docs.docker.com/storage/volumes/
See also[edit]
- Docker Volumes:
docker volume ls
,docker volume create
,docker volume inspect
,docker volumes prune
,docker volume create
,docker volume rm
,docker system df
,mounts
,--volumes-from
- Docker:
docker-compose
, Docker Desktop, Docker Scout, Docker Swarm, Docker Volumes, Docker images management, docker network,docker inspect
,docker volume inspect
,Dockerfile
, Docker Engine release notes,docker kill
,moby
, Docker-in-Docker,docker context
,buildx
,docker tag
,docker system prune
, Docker Hub,hub-tool, /etc/docker/daemon.json
,hostconfig.json
, dockerd, logs, Docker logging, Backup,docker service
,depends on
,--dns, --filter
,--mount
,docker login
,docker build
,apt remove docker.io
,.dockerignore
, docker context ls |docker-machine, .docker/
, PWD,$HOME/.docker/config.json
, Docker ID,--env-file, docker --help
Advertising: