瀏覽代碼

[GinR] Raspberry docker for GIN

cgars 7 年之前
父節點
當前提交
99ae90aba5
共有 1 個文件被更改,包括 21 次插入22 次删除
  1. 21 22
      Dockerfile.rpi

+ 21 - 22
Dockerfile.rpi

@@ -1,20 +1,18 @@
-FROM armhf/alpine:3.5
-
-# Install system utils & Gogs runtime dependencies
-ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-armhf /usr/sbin/gosu
-RUN chmod +x /usr/sbin/gosu \
-  && echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \
-  && apk --no-cache --no-progress add \
-    bash \
-    ca-certificates \
-    curl \
-    git \
-    linux-pam \
-    openssh \
-    s6 \
-    shadow \
-    socat \
-    tzdata
+FROM resin/rpi-raspbian:stretch
+
+ENV DEBIAN_FRONTEND noninteractive
+ENV INITSYSTEM on
+
+RUN apt-get update &&                                   \
+    apt-get install -y --no-install-recommends          \
+                       gcc g++ libc6-dev make golang    \
+                       git git-annex openssh-server     \
+                       python-pip python-setuptools     \
+                       socat tzdata patch    \
+                       libpam0g-dev \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN pip install supervisor pyyaml
 
 ENV GOGS_CUSTOM /data/gogs
 
@@ -27,12 +25,13 @@ COPY public /app/gogs/public
 WORKDIR /app/gogs/build
 COPY . .
 
-RUN    ./docker/build-go.sh \
-    && ./docker/build.sh \
-    && ./docker/finalize.sh
+RUN ./docker/build-go.sh
+RUN ./docker/build.sh
+RUN ./docker/finalize.sh
+
+COPY docker/nsswitch.conf /etc/nsswitch.conf
 
-# Configure Docker Container
 VOLUME ["/data"]
 EXPOSE 22 3000
 ENTRYPOINT ["/app/gogs/docker/start.sh"]
-CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]
+