Created
June 21, 2024 06:47
-
-
Save ilmoralito/2b6fea34f2a84a21985393a204120026 to your computer and use it in GitHub Desktop.
How to make docker volume on a specific path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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