diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 50 | +20 −30 |
1 files changed, 20 insertions, 30 deletions
diff --git a/Dockerfile b/Dockerfile index a625eb1..829cdf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,57 +7,47 @@ ARG ALPINE_DIGEST=sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c FROM docker.io/library/alpine:${ALPINE_VERSION}@${ALPINE_DIGEST} -ARG TARGETARCH ARG VERSION=dev ARG REVISION=unknown LABEL org.opencontainers.image.title="Gilti" \ - org.opencontainers.image.description="Tiny Git server in a box" \ - org.opencontainers.image.source="https://git.dimidiumlabs.io/gilti" \ + org.opencontainers.image.description="Boxed tiny Git server powered by cgit and Gitolite" \ + org.opencontainers.image.source="https://github.com/dimidiumlabs/gilti" \ org.opencontainers.image.version="$VERSION" \ org.opencontainers.image.revision="$REVISION" \ org.opencontainers.image.licenses="AGPL-3.0-or-later" RUN apk add --no-cache \ - bzip2=1.0.8-r6 \ + cgit=1.2.3-r5 \ + fcgiwrap=1.1.0-r8 \ git=2.49.1-r0 \ - git-daemon=2.49.1-r0 \ - libgcc=14.2.0-r6 \ - lzip=1.25-r0 \ + gitolite=3.6.13-r1 \ + nginx=1.28.3-r7 \ openssh-keygen=10.0_p1-r10 \ openssh-server=10.0_p1-r10 \ + perl=5.40.4-r0 \ + spawn-fcgi=1.6.5-r4 \ su-exec=0.2-r3 \ - tini=0.19.0-r3 \ - xz=5.8.3-r0 \ - zstd=1.5.7-r0 && \ + tini=0.19.0-r3 && \ + deluser git && \ addgroup -S -g 10000 git && \ install -d -m 0755 -o root -g root /var/lib/gilti && \ adduser -S -D -u 10000 -G git -h /var/lib/gilti/git -s /bin/sh git && \ passwd -d git && \ - install -d -m 0750 -o git -g git \ - /var/lib/gilti/git /var/lib/gilti/git/repositories && \ + git config --system init.defaultBranch main && \ + install -d -m 0750 -o git -g git /var/lib/gilti/git /var/cache/cgit && \ install -d -m 0700 -o root -g root /var/lib/gilti/ssh && \ - install -d -m 0755 -o root -g root /run/gilti && \ - install -d -m 0750 -o root -g git /run/gilti/ssh && \ - install -d -m 0755 /etc/gilti && \ - rm -rf /var/cache/apk/* + install -d -m 0755 /run/gilti /run/gilti-bootstrap && \ + rm -rf /var/cache/apk/* /etc/nginx/http.d/default.conf -COPY --chown=root:root --chmod=0755 \ - .container/binary-${TARGETARCH}/gilti \ - .container/binary-${TARGETARCH}/gilti-ssh \ - /usr/local/bin/ -COPY --chown=root:root \ - .container/binary-${TARGETARCH}/gilti.css \ - .container/binary-${TARGETARCH}/gilti.js \ - .container/binary-${TARGETARCH}/gilti.png \ - .container/binary-${TARGETARCH}/favicon.ico \ - /usr/share/gilti/ +COPY --chown=root:root config/cgitrc /etc/cgitrc +COPY --chown=root:root config/nginx.conf /etc/nginx/nginx.conf COPY --chown=root:root config/sshd_config /etc/ssh/sshd_config -COPY --chown=root:root --chmod=0755 scripts/entrypoint.sh /usr/local/bin/gilti-entrypoint -COPY --chown=root:root LICENSE README.md LICENSES/ /usr/share/doc/gilti/ +COPY --chown=root:root scripts/entrypoint.sh /usr/local/bin/gilti-entrypoint +COPY --chown=root:root LICENSE README.md /usr/share/doc/gilti/ -RUN /usr/local/bin/gilti --check && \ - /usr/local/bin/gilti-ssh --check +RUN chmod 0755 /usr/local/bin/gilti-entrypoint && \ + nginx -t -e /dev/stderr -c /etc/nginx/nginx.conf EXPOSE 8080 2222 VOLUME ["/var/lib/gilti"] |
