From e5cd70a4c35f6fca797d1e403010a76d2664687f Mon Sep 17 00:00:00 2001 From: Glenn Date: Mon, 28 Aug 2023 19:11:23 +0200 Subject: [PATCH] fix: Update dockerfile & add haskell variant --- Dockerfile | 10 ++++++++-- Dockerfile.haskell | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 Dockerfile.haskell diff --git a/Dockerfile b/Dockerfile index cd20d92..e4a3998 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ENV DEBIAN_FRONTEND noninteractive ## make the "en_US.UTF-8" locale ## RUN apt-get update \ - && apt-get install -y --no-install-recommends locales \ + && apt-get install -y --no-install-recommends locales wget \ && rm -rf /var/lib/apt/lists/* \ && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 ENV LANG en_US.utf8 @@ -18,10 +18,16 @@ ENV LANG en_US.utf8 ## ENV GITIT_VERSION 0.15.1.0+dfsg-2+b4 +# RUN wget --progress=dot:giga -O libghc-filestore-dev_0.6.5-2+b3_amd64.deb \ +# http://ftp.us.debian.org/debian/pool/main/h/haskell-filestore/libghc-filestore-dev_0.6.5-2+b3_amd64.deb \ +# && ( dpkg -i libghc-filestore-dev_0.6.5-2+b3_amd64.deb || true ) \ +# && apt-get install -y -f \ +# && rm -f libghc-filestore-dev_0.6.5-2+b3_amd64.deb + RUN apt-get update \ && apt-cache policy gitit \ && apt-get install -y --no-install-recommends \ - libghc-filestore-data mime-support gitit=$GITIT_VERSION \ + mime-support gitit=$GITIT_VERSION \ openssh-client \ && rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile.haskell b/Dockerfile.haskell new file mode 100644 index 0000000..9fdd852 --- /dev/null +++ b/Dockerfile.haskell @@ -0,0 +1,46 @@ +## Dockerfile for gitit +FROM haskell:9.0-slim +WORKDIR /app +RUN mkdir /app/bin \ + && cabal update \ + && cabal install \ + --jobs=$(($(nproc) - 1)) \ + --prefix=/app \ + gitit + +#/bin \ +# --installdir=/app/bin \ +# --libdir=/app/lib \ + + +# FROM debian:bookworm-slim +# MAINTAINER Glenn Y. Rolland + +ENV DEBIAN_FRONTEND noninteractive + +## +## make the "en_US.UTF-8" locale +## + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + locales \ + openssh-client \ + mime-support \ + && rm -rf /var/lib/apt/lists/* \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 +ENV LANG en_US.utf8 + +## +## install gitit +## +VOLUME ["/data"] + +COPY docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] + +WORKDIR /data +EXPOSE 5001 + +CMD ["gitit", "-f", "/data/gitit.conf"] +