From ab71d7f4f943e7415acf4d2a951aa571f2c63aff Mon Sep 17 00:00:00 2001 From: juliengarcia Date: Thu, 24 Dec 2015 08:58:21 +0100 Subject: [PATCH] Add Docker Volume from 1.9 --- docker/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docker/README.md b/docker/README.md index d1250cdba..99a0bee67 100644 --- a/docker/README.md +++ b/docker/README.md @@ -20,6 +20,21 @@ $ docker run --name=gogs -p 10022:22 -p 10080:3000 -v /var/gogs:/data gogs/gogs $ docker start gogs ``` +### Using Docker 1.9 Volume +``` +# Pull image from Docker Hub. +$ docker pull gogs/gogs + +# Create docker volume. +$ docker volume create --name gogs-data + +# Use `docker run` for the first time. +$ docker run --name=gogs -p 10022:22 -p 10080:3000 -v gogs-data:/data gogs/gogs + +# Use `docker start` if you have stopped it. +$ docker start gogs +``` + Files will be store in local path `/var/gogs` in my case. Directory `/var/gogs` keeps Git repositories and Gogs data: