Docker Volumes Tutorial: How They Work
We'll show you how Docker volumes work. They allow you to mount a directory from your machine to the docker container. This is cool because any changes to files you make on your machine get immediately reflected within the docker container. We'll provide a demo and show you both ways to use Docker volumes. This tutorial goes through Docker Volumes and how to use them in 2 ways:
- -v option
- --mount option
Commands
docker run -v $(pwd)/data:/data -P --rm -d httpd
docker run -v $(pwd)/htdocs:/usr/local/apache2/htdocs -P --rm -d httpd
docker run --mount source=htdocs,target=/usr/local/apache2/htdocs -P --rm -d httpd
Links:
- Docker Docs: Use volumes
- GitHub: boltops-learn/docker-volumes
Docker Essentials
1h 46m
1h 46m
Kubernetes Intro
1h 43m
1h 43m
Kubernetes Deploy Tools
48m
48m
Kubes: Kubernetes Deploy Tool
2h 21m
2h 21m
Kubernetes Tips
19m
19m
AWS EKS Kubernetes
4h 13m
4h 13m
Azure AKS Kubernetes
40m
40m
Google GKE Kubernetes
3h 29m
3h 29m
Get full access to these great resources
All for less than the price of coffee a day
44 courses
286 lessons
46+ hours