summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorLambda <lambda@disroot.org>2025-12-10 15:19:24 -0500
committerLambda <lambda@disroot.org>2025-12-10 15:19:24 -0500
commit0c79ff01fe7eb5abf369e4c14edf8eeadb692c3b (patch)
tree36aed08de5add804cacb8286ef0768381ffa5b4a /Dockerfile
downloadcgit-docker-0c79ff01fe7eb5abf369e4c14edf8eeadb692c3b.tar.gz
cgit-docker-0c79ff01fe7eb5abf369e4c14edf8eeadb692c3b.tar.bz2
cgit-docker-0c79ff01fe7eb5abf369e4c14edf8eeadb692c3b.zip
Initial commit
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..3190d9f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,31 @@
+FROM rockylinux:9
+LABEL MAINTAINER="Lambda <lambda@disroot.org>"
+
+# Update everything; install dependencies.
+RUN dnf -y update && dnf -y upgrade \
+ && dnf install -y git gcc make openssl-devel zlib-devel zip \
+ highlight httpd \
+ && dnf clean all
+
+# Install cgit.
+RUN git clone https://git.zx2c4.com/cgit
+ADD cgit.conf cgit
+RUN cd cgit \
+ && git submodule init \
+ && git submodule update \
+ && make NO_LUA=1 \
+ && make install \
+ && cd .. \
+ && rm -rf cgit
+
+# Configure.
+ADD etc/cgitrc /etc/cgitrc
+ADD etc/httpd/httpd.conf /etc/httpd/conf/httpd.conf
+
+# Add custom syntax highlighting.
+COPY opt/highlight.sh /opt/highlight.sh
+
+# You SHOULD run this behind a reverse proxy.
+# Thus, 443 isn't being exposed.
+EXPOSE 80
+CMD [ "httpd", "-DFOREGROUND" ] \ No newline at end of file