Skip to content

Instantly share code, notes, and snippets.

@camsaul
Created December 3, 2020 01:49
Show Gist options
  • Save camsaul/52ee92f86f63c2a47d087aaaacdefdcb to your computer and use it in GitHub Desktop.
Save camsaul/52ee92f86f63c2a47d087aaaacdefdcb to your computer and use it in GitHub Desktop.
SBCL Dockerfile with Quicklisp
FROM alpine:edge
MAINTAINER Cam Saul <[email protected]>
WORKDIR /app
RUN apk add --update curl sbcl
# create a unpriviledged user
RUN addgroup -S lisp
RUN adduser -S lisp -G lisp
# Download QuickLisp
RUN curl -o quicklisp.lisp https://beta.quicklisp.org/quicklisp.lisp
# Uninstall Curl
RUN apk del curl
# Change owner of /app to unprivileged user
RUN chown -R lisp /app
# Switch to lisp user
USER lisp
# Install QuickLisp
RUN sbcl --load quicklisp.lisp --quit --eval '(quicklisp-quickstart:install)'
RUN sbcl --load /home/lisp/quicklisp/setup.lisp --quit --eval '(ql-util:without-prompting (ql:add-to-init-file))'
RUN rm quicklisp.lisp
ENTRYPOINT ["sbcl"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment