You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1002 B
42 lines
1002 B
FROM alpine
|
|
|
|
LABEL maintainer "jerryaldrichiii@gmail.com"
|
|
|
|
RUN apk add --no-cache openssh git-daemon
|
|
|
|
RUN apk add --no-cache gitolite=3.6.11-r0
|
|
|
|
# Upstream maintainer won't accept patch to allow symlinks
|
|
# So...I do a bad thing...
|
|
RUN sed -i 's/\(find.*-type f\) -name/\1 -or -type l -name/' /usr/lib/gitolite/commands/compile-template-data
|
|
|
|
# Create group so data can be shared
|
|
RUN addgroup --gid 1000 shared
|
|
RUN adduser git shared
|
|
|
|
VOLUME ["/bootstrap"]
|
|
VOLUME ["/srv/git/repos"]
|
|
|
|
# Configure SSHD
|
|
RUN mkdir -p /srv/sshd
|
|
COPY sshd_config /srv/sshd/sshd_config
|
|
RUN chown -R git:git /srv/sshd
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 2222 9418
|
|
|
|
USER git
|
|
|
|
RUN gitolite setup -a dummy
|
|
RUN mkdir /var/lib/git/.gitolite/keydir
|
|
|
|
RUN rm -rf /var/lib/git/repositories/
|
|
RUN ln -s /srv/git/repos/ /var/lib/git/repositories
|
|
RUN chown -h git:shared /var/lib/git/repositories
|
|
|
|
RUN rm /var/lib/git/.gitolite.rc
|
|
COPY gitolite.rc /var/lib/git/.gitolite.rc
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|