2017-02-24 08:37:21 +03:00
|
|
|
|
FROM armhf/alpine:3.5
|
2015-11-22 18:14:08 +03:00
|
|
|
|
|
|
|
|
|
# Install system utils & Gogs runtime dependencies
|
2016-05-11 20:11:59 +03:00
|
|
|
|
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-armhf /usr/sbin/gosu
|
2016-02-25 20:41:41 +03:00
|
|
|
|
RUN chmod +x /usr/sbin/gosu \
|
2016-07-15 05:55:05 +03:00
|
|
|
|
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata
|
2015-11-22 18:14:08 +03:00
|
|
|
|
|
|
|
|
|
ENV GOGS_CUSTOM /data/gogs
|
|
|
|
|
|
2017-02-24 08:37:21 +03:00
|
|
|
|
COPY . /app/gogs/build
|
|
|
|
|
WORKDIR /app/gogs/build
|
|
|
|
|
|
|
|
|
|
RUN ./docker/build-go.sh \
|
|
|
|
|
&& ./docker/build.sh \
|
|
|
|
|
&& ./docker/finalize.sh
|
2015-11-22 18:14:08 +03:00
|
|
|
|
|
2016-01-25 16:07:37 +03:00
|
|
|
|
# Configure LibC Name Service
|
|
|
|
|
COPY docker/nsswitch.conf /etc/nsswitch.conf
|
|
|
|
|
|
2015-11-22 18:14:08 +03:00
|
|
|
|
# Configure Docker Container
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
EXPOSE 22 3000
|
2017-02-24 08:37:21 +03:00
|
|
|
|
ENTRYPOINT ["/app/gogs/docker/start.sh"]
|
2015-12-29 20:46:39 +03:00
|
|
|
|
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]
|