From 0f5dbcc3bdeb401f00c1cdcb7b0ef826003b5bd7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 26 Mar 2022 12:44:29 +0300 Subject: docker: add a frontend nginx image At first, I built a custom image at https://egort.name/. It had a rather long development history, and I just copied the files from there. --- docker/frontend/Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docker/frontend/Dockerfile (limited to 'docker/frontend/Dockerfile') diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile new file mode 100644 index 0000000..5fb1960 --- /dev/null +++ b/docker/frontend/Dockerfile @@ -0,0 +1,19 @@ +FROM nginx:1 + +RUN export DEBIAN_FRONTEND=noninteractive && \ + runtime_deps='cgit cmark-gfm fcgiwrap tini' && \ + apt-get update && \ + apt-get install -y --no-install-recommends $runtime_deps && \ + # Install the latest Pygments (so that it would highlight CMakeLists.txt, etc.): + apt-get install -y --no-install-recommends python3-pip && \ + pip3 install --no-cache-dir pygments~=2.0 && \ + # Replace the theme with the one I like better: + grep -q -F -- "style='pastie'" /usr/lib/cgit/filters/syntax-highlighting.py && \ + sed -i -e "s/style='pastie'/style='vs'/" -- /usr/lib/cgit/filters/syntax-highlighting.py + +COPY ["etc/", "/etc/"] +COPY ["usr/", "/usr/"] +COPY ["cmd.sh", "/"] + +ENTRYPOINT ["/usr/bin/tini", "--"] +CMD ["/cmd.sh"] -- cgit v1.2.3