cl-deck-builder2/Dockerfile
2024-03-05 22:11:33 -05:00

62 lines
2.0 KiB
Docker

ARG TARGETARCH TARGETPLATFORM TARGETVARIANT
FROM --platform=$TARGETPLATFORM docker.io/$TARGETARCH${TARGETVARIANT}/alpine:3.18.2
RUN addgroup -g 1000 quicklisp && adduser -D -G quicklisp -u 1000 quicklisp
RUN set -eux; \
apk add --no-cache \
cgit \
curl \
gcc \
git \
imagemagick \
libev \
make \
musl-dev \
py3-markdown \
py3-pygments \
python3 \
sbcl \
sqlite \
sqlite-libs \
texlive \
texlive-xetex \
texmf-dist-latexextra \
zxing && \
rm -rf /var/cache/apk/*
WORKDIR /home/quicklisp/
USER quicklisp
RUN curl -O https://beta.quicklisp.org/quicklisp.lisp
RUN sbcl --noinform --no-userinit --no-sysinit --non-interactive \
--load quicklisp.lisp --eval "(quicklisp-quickstart:install)" \
--eval "(ql-util:without-prompting (ql:add-to-init-file))"
RUN sbcl --non-interactive \
--eval "(ql:quickload '(:slynk :slynk/arglists :slynk/fancy-inspector :slynk/indentation :slynk/mrepl :slynk/profiler :slynk/trace-dialog))"
RUN sbcl --non-interactive \
--eval "(ql:quickload '(:assoc-utils \
:caveman2 :clack :clack-errors :datafly :djula :envy :hunchentoot :woo \
:can :mito-auth :lack :lack-middleware-clack-errors :lack-middleware-csrf \
:cl-csv :cl-json :cl-org-mode :cl-pass :dbd-sqlite3 :documentation-utils \
:documentation-utils-extensions :lispqr :mito :mito-attachment :ratify \
:sxql :trivial-download :verbose :websocket-driver :cl-markup :hermetic \
:inferior-shell :psychiq :djula-gettext :gettext))"
RUN mkdir -p /home/quicklisp/public
COPY --chown=quicklisp:quicklisp . /home/quicklisp/quicklisp/local-projects/cl-deck-builder2/
RUN sbcl --non-interactive \
--eval "(ql:register-local-projects)" \
--eval "(ql:quickload :cl-deck-builder2)"
EXPOSE 4005 5005
VOLUME ["/home/quicklisp/public/"]
CMD ["sbcl", "--load", "/home/quicklisp/quicklisp/local-projects/cl-deck-builder2/preamble.lisp", "--eval", "(cl-deck-builder2:main)"]