Skip to content

Instantly share code, notes, and snippets.

@ilmoralito
Created June 21, 2024 06:47
Show Gist options
  • Save ilmoralito/2b6fea34f2a84a21985393a204120026 to your computer and use it in GitHub Desktop.
Save ilmoralito/2b6fea34f2a84a21985393a204120026 to your computer and use it in GitHub Desktop.
How to make docker volume on a specific path
// craete a custom volume an store mariadb data in volume custom location
$ docker volume create --driver local --opt type=none --opt device=/media/username/Files/MariaDB-10.1.48 --opt o=bind MariaDB-10.1.48
MariaDB-10.1.48
$ docker run -d --name crm -v MariaDB-10.1.48:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=secret -p 3306:3306 mariadb:10.1.48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment