Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM index.docker.io/alpine:3.16.2
  2. LABEL MAINTAINER="heckyel@riseup.net"
  3. # Install needed packages
  4. RUN set -xe \
  5. && apk update \
  6. && apk upgrade \
  7. && apk add --no-cache --purge -uU \
  8. # Install gitolite
  9. gitolite git openssh \
  10. # install git-daemon
  11. git-daemon \
  12. # add nginx and cgit
  13. cgit nginx fcgiwrap spawn-fcgi \
  14. # python 3 pkg for highlight, about page
  15. py3-markdown py3-pygments \
  16. # tarballs support
  17. lzip xz zstd gzip bzip2 \
  18. # Create nginx folder
  19. && mkdir -p /run/nginx \
  20. # Clean up
  21. && rm -rf /var/cache/apk/* \
  22. && rm -rf /tmp/*
  23. # Volume to store all ssh host key
  24. VOLUME [ "/etc/ssh" ]
  25. # Volume to store Gitolite data, used for Gitolite setup
  26. VOLUME [ "/var/lib/git" ]
  27. EXPOSE 22 80 9418
  28. WORKDIR /var/lib/git
  29. COPY cgit.css /usr/share/webapps/cgit/cgit.css
  30. COPY md2html /usr/lib/cgit/filters/html-converters/md2html
  31. COPY syntax-highlighting.py /usr/lib/cgit/filters/syntax-highlighting.py
  32. COPY gitolite.rc /var/lib/git/.gitolite.rc
  33. COPY entrypoint.sh /
  34. RUN chmod u+x /usr/lib/cgit/filters/html-converters/md2html
  35. RUN chmod u+x /usr/lib/cgit/filters/syntax-highlighting.py
  36. RUN chmod u+x /entrypoint.sh
  37. ENTRYPOINT ["/entrypoint.sh"]