dockerfiles/gitolite-stagit/Dockerfile

47 lines
1.4 KiB
Docker

FROM alpine:3.12
RUN apk add --no-cache \
gitolite \
openssh-server \
su-exec \
libgit2 && \
apk add --no-cache --virtual .build-deps \
gcc \
make \
musl-dev \
libgit2-dev && \
git clone git://git.codemadness.org/stagit /tmp/stagit && \
make -C /tmp/stagit && \
make -C /tmp/stagit install && \
rm -r /tmp/stagit && \
apk del .build-deps && \
passwd -u git && \
mkdir -p /opt/gitolite-local/hooks/common
COPY sshd_config /etc/ssh/sshd_config
COPY gitolite.rc /var/lib/git/.gitolite.rc
COPY bin/. /usr/local/bin/
COPY local_code/. /opt/gitolite-local/
RUN chown -R git:git /var/lib/git && \
chmod +x \
/usr/local/bin/entrypoint \
/usr/local/bin/build-stagit-index \
/usr/local/bin/build-stagit-repo \
/usr/local/bin/build-stagit-repos \
/usr/local/bin/set-url \
/usr/local/bin/set-urls \
/usr/local/bin/set-owner \
/usr/local/bin/set-owners \
/opt/gitolite-local/hooks/common/post-receive \
/opt/gitolite-local/triggers/build-stagit-index \
/opt/gitolite-local/triggers/build-stagit-repos \
/opt/gitolite-local/triggers/set-url \
/opt/gitolite-local/triggers/set-urls \
/opt/gitolite-local/triggers/set-owners \
/opt/gitolite-local/triggers/set-owner
ENTRYPOINT ["/usr/local/bin/entrypoint"]
CMD ["/usr/sbin/sshd", "-D", "-e"]