Docker volumes: Create volume
23 October 2022 (Updated 23 October 2022)
On this page
Syntax
docker volume create <volume-name>
Example: Create volume to store MySQL data
docker run --name mysql-wvol \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=my-secret-pw \
-d \
--mount \
source=mysqlvol,target=/var/lib/mysql mysql
Tagged:
Docker
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment