Created
December 3, 2020 01:49
-
-
Save camsaul/52ee92f86f63c2a47d087aaaacdefdcb to your computer and use it in GitHub Desktop.
SBCL Dockerfile with Quicklisp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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