diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-07-04 16:31:13 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-07-04 16:31:57 +0530 |
| commit | ef34b26068c4e25f929a584edda63b8878c063b3 (patch) | |
| tree | aaa2445b12807109f265e8869a54f76cb752da9e /cgit/Dockerfile | |
| parent | 1569f35ae6cd90b056cb237ba020c69d37ebafb5 (diff) | |
| download | bacchus-remote-ef34b26068c4e25f929a584edda63b8878c063b3.tar.gz bacchus-remote-ef34b26068c4e25f929a584edda63b8878c063b3.zip | |
Create local dockerfiles override to manage send/cgit users/groups
Diffstat (limited to '')
| -rw-r--r-- | cgit/Dockerfile | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/cgit/Dockerfile b/cgit/Dockerfile new file mode 100644 index 0000000..86b3005 --- /dev/null +++ b/cgit/Dockerfile @@ -0,0 +1,67 @@ +FROM nginx:1.28.1-alpine3.23 + +ARG VERSION=0.0.0 +ENV VERSION=${VERSION} + +RUN addgroup -S git -g 1001 && adduser -S -G git -u 1001 -D git + +# CGit +ARG CGIT_VERSION=1.2.3-r5 +ENV CGIT_VERSION=${CGIT_VERSION} + +LABEL version="${VERSION}" \ + description="The hyperfast web frontend for Git repositories on top of Alpine and Nginx." \ + maintainer="Jose Quintana <joseluisq.net>" + +RUN set -eux \ + && apk add --no-cache \ + ca-certificates \ + cgit=${CGIT_VERSION} \ + fcgiwrap \ + git \ + lua5.3-libs \ + py3-markdown \ + py3-pygments \ + py3-docutils \ + groff \ + python3 \ + spawn-fcgi \ + tzdata \ + xz \ + zlib \ + && rm -rf /var/cache/apk/* \ + && rm -rf /tmp/* \ + && true + +COPY docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh +COPY nginx/ /etc/nginx + +# RUN set -eux \ +# && echo "Creating application directories..." \ +# && mkdir -p /var/cache/cgit \ +# && mkdir -p /srv/git \ +# && true + +RUN set -eux \ + && echo "Testing Nginx server configuration files..." \ + && nginx -c /etc/nginx/nginx.conf -t \ + && true + +RUN ls -la /docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] + +EXPOSE 80 + +STOPSIGNAL SIGQUIT + +CMD [ "nginx", "-g", "daemon off;" ] + +# Metadata +LABEL org.opencontainers.image.vendor="Jose Quintana" \ + org.opencontainers.image.url="https://github.com/joseluisq/alpine-cgit" \ + org.opencontainers.image.title="cgit" \ + org.opencontainers.image.description="The hyperfast web frontend for Git repositories on top of Alpine and Nginx." \ + org.opencontainers.image.version="${VERSION}" \ + org.opencontainers.image.documentation="https://github.com/joseluisq/alpine-cgit" |
