sajad torkamani

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

Leave a comment

Your email address will not be published. Required fields are marked *