64. Docker Volume Cross-Platform Consistency
Beginner Mode
Start your terminal to use beginner mode.
Scenario:
You need to create a Docker volume named myvol and demonstrate cross-platform consistency - that data written from one container is readable by a different container using a different base image.
Task:
Create a Docker volume named myvol, mount it at /data, write a file hello.txt to it from an ubuntu:latest container, then read the same file from an alpine:latest container, ensuring the file exists at /var/lib/docker/volumes/myvol/_data/hello.txt on the host during validation.
Example:
# Writing from Ubuntu
ubuntu@container:/# echo "Hello from Ubuntu!" > /data/hello.txt
# Reading from Alpine
/ # cat /data/hello.txt
Hello from Ubuntu!
Terminal requires a larger screen
Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.
Linux Terminal Environment
Write and execute your solution in the terminal below.
Essential
Linux 0/29
AWS 0/10
Kubernetes 0/15
CI/CD 0/5
Networking 0/9
Need more practice in this area? Explore more questions →
GitLab
Accenture
Coinbase
Adobe
EPAM
Twitch
Amazon
Kayak
Autodesk
Lyft
Revolut
RedHat
Bloomberg
Datadog
Palantir
TCS
HashiCorp
Google
DeutscheBank
GitHub
Apple
Cloudflare
Stripe
Microsoft
NVIDIA
GoDaddy
X
SAP
Spotify
Airbnb
Meta
Reddit
Yelp
Okta
Dropbox
Slack
ActivisionBlizzard
Zscaler
Uber
IBM
DeliveryHero
Robinhood
Shopify
Samsung
Elastic
Twilio
Netflix
CrowdStrike
Ubisoft
Anthropic
Capital One
Splunk
Intel
AMD
Databricks