summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
-rw-r--r--Dockerfile.rpi5
-rwxr-xr-xdocker/build.sh4
-rw-r--r--docker/nsswitch.conf16
4 files changed, 26 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index a7ff05fe3f..2bd6a9716d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM alpine:3.2
-MAINTAINER roemer.jp@gmail.com
+MAINTAINER jp@roemer.im
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.6/gosu-amd64 /usr/sbin/gosu
@@ -15,6 +15,9 @@ COPY . /app/gogs/
WORKDIR /app/gogs/
RUN ./docker/build.sh
+# Configure LibC Name Service
+COPY docker/nsswitch.conf /etc/nsswitch.conf
+
# Configure Docker Container
VOLUME ["/data"]
EXPOSE 22 3000
diff --git a/Dockerfile.rpi b/Dockerfile.rpi
index 552a4f8af8..ef3994dd60 100644
--- a/Dockerfile.rpi
+++ b/Dockerfile.rpi
@@ -1,5 +1,5 @@
FROM sander85/rpi-alpine:latest
-MAINTAINER roemer.jp@gmail.com, raxetul@gmail.com
+MAINTAINER jp@roemer.im, raxetul@gmail.com
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.6/gosu-armhf /usr/sbin/gosu
@@ -15,6 +15,9 @@ COPY . /app/gogs/
WORKDIR /app/gogs/
RUN ./docker/build.sh
+# Configure LibC Name Service
+COPY docker/nsswitch.conf /etc/nsswitch.conf
+
# Configure Docker Container
VOLUME ["/data"]
EXPOSE 22 3000
diff --git a/docker/build.sh b/docker/build.sh
index 4249b1d122..83ef8f2b2b 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@community 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
+