diff options
Diffstat (limited to 'docker/Dockerfile.gitolite')
-rw-r--r-- | docker/Dockerfile.gitolite | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/docker/Dockerfile.gitolite b/docker/Dockerfile.gitolite index 66367b5..d2ca1ae 100644 --- a/docker/Dockerfile.gitolite +++ b/docker/Dockerfile.gitolite @@ -4,20 +4,14 @@ FROM archlinux -# Set this to the administrator's SSH public key file (username.pub) -ARG pubkey - # The gitolite package implies git, openssh, and creates the host user RUN pacman-key --init RUN pacman -Syu --needed --noconfirm gitolite # Initialize the gitolite datastore -COPY $pubkey / -RUN runuser -u gitolite -- gitolite setup -pk /$pubkey -RUN runuser -u gitolite -- chmod 755 /var/lib/gitolite -RUN runuser -u gitolite -- chmod -R 755 /var/lib/gitolite/repositories -RUN runuser -u gitolite -- ln -sf .gitolite/conf/.gitolite.rc /var/lib/gitolite -RUN runuser -u gitolite -- ln -sf .gitolite/conf/.gitconfig /var/lib/gitolite +COPY . /app +RUN if [ -f "/app/admin.pub" ]; \ + then runuser -u gitolite -- /app/gitolite_init.sh "/app/admin.pub"; fi VOLUME /var/lib/gitolite # sshd host keys are stored in a volume so that rebuilding/updating the |