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