From bc5c44dd049bad3b007be48b3f8d90886d63c105 Mon Sep 17 00:00:00 2001 From: System administrator Date: Mon, 29 May 2017 13:26:10 +0200 Subject: Initial commit --- images/git/Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 images/git/Dockerfile (limited to 'images/git/Dockerfile') diff --git a/images/git/Dockerfile b/images/git/Dockerfile new file mode 100644 index 0000000..bd8589e --- /dev/null +++ b/images/git/Dockerfile @@ -0,0 +1,35 @@ +FROM alpine:3.5 AS builder + +RUN apk add --no-cache sassc + +ADD cgit/cgit.sass /app/ +RUN sassc -t compressed /app/cgit.sass /app/cgit.css + +FROM server_runit AS final + +RUN apk add --no-cache sudo shadow \ + git gitolite git-daemon \ + openssh openssh-client \ + cgit highlight markdown \ + nginx spawn-fcgi fcgiwrap + +# gitolite +RUN mkdir -p /data /data/log +RUN echo 'git:*' | chpasswd +RUN usermod --home /data/git --move-home git + +ADD gitolite/ /app/ +RUN ln -s /app/gitolite.rc /data/git/.gitolite.rc +RUN chown -R git:git /app/gitolite.rc /data/log /data/git +RUN sudo -u git GL_LOGFILE=/data/log/gitolite gitolite setup -pk /app/admin.pub + +ADD gitolite/sshd_config /etc/ssh/ +ADD gitolite/generate_certs.sh /app/ + +# cgit +ADD cgit/cgitrc /etc/ +ADD cgit/syntax-highlighting3.sh /app/ +ADD cgit/about-formatting.sh /app/ +COPY --from=builder /app/cgit.css /usr/share/webapps/cgit/cgit.css + +ADD nginx/nginx.conf /etc/nginx/nginx.conf -- cgit v1.2.3