diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/README.md | 9 | ||||
-rwxr-xr-x | docker/build.sh | 4 | ||||
-rw-r--r-- | docker/nsswitch.conf | 16 |
3 files changed, 27 insertions, 2 deletions
diff --git a/docker/README.md b/docker/README.md index 6e2209fbfd..63d4a51e87 100644 --- a/docker/README.md +++ b/docker/README.md @@ -46,6 +46,15 @@ docker run --name=gogs-data --entrypoint /bin/true gogs/gogs # Use `docker run` for the first time. docker run --name=gogs --volumes-from gogs-data -p 10022:22 -p 10080:3000 gogs/gogs ``` +#### Using Docker 1.9 Volume command + +``` +# 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 +``` ## Settings diff --git a/docker/build.sh b/docker/build.sh index 4249b1d122..e109affc53 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -7,7 +7,7 @@ export GOPATH=/tmp/go export PATH=${PATH}:${GOPATH}/bin # Install build deps -apk -U --no-progress add linux-pam-dev go@community gcc musl-dev +apk -U --no-progress add --virtual build-deps linux-pam-dev go gcc musl-dev # Init go environment to build Gogs mkdir -p ${GOPATH}/src/github.com/gogits/ @@ -20,7 +20,7 @@ go build -tags "sqlite cert pam" rm -r $GOPATH # Remove build deps -apk --no-progress del linux-pam-dev go gcc musl-dev +apk --no-progress del build-deps # Create git user for Gogs adduser -H -D -g 'Gogs Git User' git -h /data/git -s /bin/bash && passwd -u git diff --git a/docker/nsswitch.conf b/docker/nsswitch.conf new file mode 100644 index 0000000000..70eb1733f4 --- /dev/null +++ b/docker/nsswitch.conf @@ -0,0 +1,16 @@ +# /etc/nsswitch.conf + +passwd: compat +group: compat +shadow: compat + +hosts: files dns +networks: files + +protocols: db files +services: db files +ethers: db files +rpc: db files + +netgroup: nis + |