Docker Volumes & Data Management
38%
Why and When to Use Volumes?
To answer the question, let's consider the following scenarios:
# Create a container
docker run -it -d --name my_container busybox
# Write some data to /data
docker exec my_container sh -c "mkdir -p /data"
docker exec my_container sh -c 'echo "Hello, World!" > /data/hello.txt'
# Stop and remove the containerPainless Docker - 2nd Edition
A Comprehensive Guide to Mastering Docker and its EcosystemEnroll now to unlock all content and receive all future updates for free.
Unlock now  $31.99$25.59Learn More
Hurry! This limited time offer ends in:
To redeem this offer, copy the coupon code below and apply it at checkout:
