From 76fbe43a8e1cb13cfe4a24bb78ac510a13c85651 Mon Sep 17 00:00:00 2001 From: startxfr Date: Mon, 8 Dec 2014 23:49:15 +0100 Subject: adding example for using volumes --- Services/mariadb/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Services/mariadb') diff --git a/Services/mariadb/README.md b/Services/mariadb/README.md index db7e14e..76d4842 100644 --- a/Services/mariadb/README.md +++ b/Services/mariadb/README.md @@ -4,11 +4,11 @@ This container run mariadb on fedora server. ## Running from docker registry docker run -d -p 3306:3306 --name="mariadb" startx/sv-mariadb - # when used with a volume container - docker run -d -v /var/lib/mysql -v /var/log/mysql --name mariadb-data startx/sv-mariadb - docker run -d --volumes-from mariadb-data -p 3306:3306 --name="mariadb" startx/sv-mariadb + # when used with a volume container (run data container, then run service) + docker run -d -v /var/lib/mysql -v /var/log/mysql --name mariadb-data startx/sv-mariadb echo "Data container for mariadb" + docker run -d -p 3306:3306 --volumes-from mariadb-data --name="mariadb" startx/sv-mariadb # when used in a linked container - docker run -d -p 3306:3306 --name="mariadb" startx/sv-mariadb + docker run -d --name="mariadb" startx/sv-mariadb docker run -d --name="php" --link mariadb:mariadb startx/sv-php ## Build and run from local Dockerfile -- cgit v1.2.3