├── .gitignore ├── .gitlab-ci.config.yml ├── .gitlab-ci.yml ├── 2.3.1 ├── alpine3.16 │ ├── Dockerfile │ └── docker-entrypoint.sh ├── alpine3.17 │ ├── Dockerfile │ └── docker-entrypoint.sh ├── bullseye │ ├── Dockerfile │ ├── docker-entrypoint.sh │ ├── install-quicklisp │ └── slim │ │ ├── Dockerfile │ │ └── docker-entrypoint.sh ├── buster │ ├── Dockerfile │ ├── docker-entrypoint.sh │ ├── install-quicklisp │ └── slim │ │ ├── Dockerfile │ │ └── docker-entrypoint.sh ├── windowsservercore-1809 │ └── Dockerfile └── windowsservercore-ltsc2019 │ └── Dockerfile ├── CONTRIBUTING ├── Dockerfile-apk-nightly.template ├── Dockerfile-apk.template ├── Dockerfile-apt-nightly.template ├── Dockerfile-apt-slim-nightly.template ├── Dockerfile-apt-slim.template ├── Dockerfile-apt.template ├── Dockerfile-windowsservercore.template ├── LICENSE ├── README.org ├── docker-entrypoint.sh ├── extract-nightly-commit.sh ├── generate-readme.sh ├── generate-stackbrew-library.sh ├── hub-description-template.md ├── hub-description-template.org ├── install-quicklisp └── update.sh /.gitignore: -------------------------------------------------------------------------------- 1 | priv 2 | .env 3 | /build 4 | -------------------------------------------------------------------------------- /.gitlab-ci.config.yml: -------------------------------------------------------------------------------- 1 | .config: 2 | arches: 3 | amd64: "yes" 4 | arm64v8: "yes" 5 | arm32v7: "yes" 6 | winamd64: "no" 7 | build_namespace: "daewok" 8 | canonical_namespace: "clfoundation" 9 | namespaces: 10 | - "daewok" 11 | - "clfoundation" 12 | rc_versions: 13 | - 2.3.2-rc 14 | rc_changes: 15 | - 2.3.2-rc/**/* 16 | versions: 17 | - "2.3.1" 18 | release_changes: 19 | - 2.3.1/**/* 20 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - local: '/.gitlab-ci.config.yml' 3 | - project: 'cl-docker-images/ci-helpers' 4 | file: '/cl-docker-images-default-pipeline-v3.yml' 5 | -------------------------------------------------------------------------------- /2.3.1/alpine3.16/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM alpine:3.16 7 | 8 | ENV SBCL_VERSION 2.3.1 9 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 10 | 11 | WORKDIR /usr/local/src/ 12 | 13 | # hadolint ignore=DL3003,DL3018 14 | RUN set -x \ 15 | && case "$(cat /etc/apk/arch)" in \ 16 | # We use ECL to build because the version of SBCL in the edge repo doesn't 17 | # work for armv7 (edge has updated musl libc incompatibly). 18 | armv7) \ 19 | SBCL_ARCH=arm; \ 20 | if grep "3.12" /etc/issue 2>/dev/null >/dev/null ; then \ 21 | HOST_LISP="ecl"; \ 22 | ECL_VERSION=20.4.24; \ 23 | export ECL_VERSION; \ 24 | else \ 25 | HOST_LISP="sbcl"; \ 26 | fi \ 27 | ;; \ 28 | aarch64) SBCL_ARCH=arm64; HOST_LISP="sbcl";; \ 29 | x86_64) SBCL_ARCH=x86-64; HOST_LISP="sbcl";; \ 30 | *) echo "Unknown arch" >&2; exit 1;; \ 31 | esac \ 32 | && export SBCL_ARCH \ 33 | && import_key() { \ 34 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$1"; \ 35 | } \ 36 | && download_and_validate_hashes() { \ 37 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 38 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 39 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 40 | } \ 41 | && download_source() { \ 42 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 43 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 44 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 45 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 46 | && sha256sum -c "${1}-sum-file.txt" \ 47 | && tar xf "sbcl-${1}-source.tar"; \ 48 | } \ 49 | && build_and_install_source() { \ 50 | cd "sbcl-${1}/" \ 51 | # Remove the hardcoding of armv5 as target arch. Use the default 52 | # provided by the base image. 53 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 54 | && sh make.sh "--xc-host=${2}" \ 55 | && sh install.sh \ 56 | && cd /usr/local/src; \ 57 | } \ 58 | && if [ "$HOST_LISP" = "ecl" ]; then \ 59 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 60 | gmp-dev libffi-dev gnupg \ 61 | && curl -fsSL https://common-lisp.net/project/ecl/static/files/release/ecl-$ECL_VERSION.tgz > ecl-$ECL_VERSION.tgz \ 62 | && echo "4c127e0d6a99e38f3a926135ae92d92899058c5a5e99b90f28d4a47b58d94ee89a958cfb4bfd2b9e6ad7b3c57867cd13119b2a4dd6bb1aa3bb5ec42a96bfa788 ecl-20.4.24.tgz" | sha512sum -c \ 63 | && gunzip ecl-${ECL_VERSION}.tgz \ 64 | && tar xf ecl-${ECL_VERSION}.tar \ 65 | && (cd ecl-${ECL_VERSION} && ./configure --disable-manual && make -j "$(nproc)" && make install); \ 66 | else \ 67 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg \ 68 | && apk add --no-cache sbcl --repository http://dl-3.alpinelinux.org/alpine/edge/community/; \ 69 | fi \ 70 | && GNUPGHOME="$(mktemp -d)" \ 71 | && export GNUPGHOME \ 72 | && import_key "$SBCL_SIGNING_KEY" \ 73 | && download_and_validate_hashes "$SBCL_VERSION" \ 74 | && download_source "$SBCL_VERSION" \ 75 | && build_and_install_source "$SBCL_VERSION" "$HOST_LISP" \ 76 | && if [ "$HOST_LISP" = "ecl" ]; then \ 77 | (cd ecl-${ECL_VERSION} && make uninstall) \ 78 | && apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 79 | gmp-dev libffi-dev gnupg; \ 80 | else \ 81 | apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg sbcl; \ 82 | fi \ 83 | && rm -rf "$GNUPGHOME" ./* \ 84 | && sbcl --version 85 | 86 | WORKDIR / 87 | 88 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 89 | 90 | ENTRYPOINT ["docker-entrypoint.sh"] 91 | 92 | CMD ["sbcl"] 93 | -------------------------------------------------------------------------------- /2.3.1/alpine3.16/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /2.3.1/alpine3.17/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM alpine:3.17 7 | 8 | ENV SBCL_VERSION 2.3.1 9 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 10 | 11 | WORKDIR /usr/local/src/ 12 | 13 | # hadolint ignore=DL3003,DL3018 14 | RUN set -x \ 15 | && case "$(cat /etc/apk/arch)" in \ 16 | # We use ECL to build because the version of SBCL in the edge repo doesn't 17 | # work for armv7 (edge has updated musl libc incompatibly). 18 | armv7) \ 19 | SBCL_ARCH=arm; \ 20 | if grep "3.12" /etc/issue 2>/dev/null >/dev/null ; then \ 21 | HOST_LISP="ecl"; \ 22 | ECL_VERSION=20.4.24; \ 23 | export ECL_VERSION; \ 24 | else \ 25 | HOST_LISP="sbcl"; \ 26 | fi \ 27 | ;; \ 28 | aarch64) SBCL_ARCH=arm64; HOST_LISP="sbcl";; \ 29 | x86_64) SBCL_ARCH=x86-64; HOST_LISP="sbcl";; \ 30 | *) echo "Unknown arch" >&2; exit 1;; \ 31 | esac \ 32 | && export SBCL_ARCH \ 33 | && import_key() { \ 34 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$1"; \ 35 | } \ 36 | && download_and_validate_hashes() { \ 37 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 38 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 39 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 40 | } \ 41 | && download_source() { \ 42 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 43 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 44 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 45 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 46 | && sha256sum -c "${1}-sum-file.txt" \ 47 | && tar xf "sbcl-${1}-source.tar"; \ 48 | } \ 49 | && build_and_install_source() { \ 50 | cd "sbcl-${1}/" \ 51 | # Remove the hardcoding of armv5 as target arch. Use the default 52 | # provided by the base image. 53 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 54 | && sh make.sh "--xc-host=${2}" \ 55 | && sh install.sh \ 56 | && cd /usr/local/src; \ 57 | } \ 58 | && if [ "$HOST_LISP" = "ecl" ]; then \ 59 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 60 | gmp-dev libffi-dev gnupg \ 61 | && curl -fsSL https://common-lisp.net/project/ecl/static/files/release/ecl-$ECL_VERSION.tgz > ecl-$ECL_VERSION.tgz \ 62 | && echo "4c127e0d6a99e38f3a926135ae92d92899058c5a5e99b90f28d4a47b58d94ee89a958cfb4bfd2b9e6ad7b3c57867cd13119b2a4dd6bb1aa3bb5ec42a96bfa788 ecl-20.4.24.tgz" | sha512sum -c \ 63 | && gunzip ecl-${ECL_VERSION}.tgz \ 64 | && tar xf ecl-${ECL_VERSION}.tar \ 65 | && (cd ecl-${ECL_VERSION} && ./configure --disable-manual && make -j "$(nproc)" && make install); \ 66 | else \ 67 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg \ 68 | && apk add --no-cache sbcl --repository http://dl-3.alpinelinux.org/alpine/edge/community/; \ 69 | fi \ 70 | && GNUPGHOME="$(mktemp -d)" \ 71 | && export GNUPGHOME \ 72 | && import_key "$SBCL_SIGNING_KEY" \ 73 | && download_and_validate_hashes "$SBCL_VERSION" \ 74 | && download_source "$SBCL_VERSION" \ 75 | && build_and_install_source "$SBCL_VERSION" "$HOST_LISP" \ 76 | && if [ "$HOST_LISP" = "ecl" ]; then \ 77 | (cd ecl-${ECL_VERSION} && make uninstall) \ 78 | && apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 79 | gmp-dev libffi-dev gnupg; \ 80 | else \ 81 | apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg sbcl; \ 82 | fi \ 83 | && rm -rf "$GNUPGHOME" ./* \ 84 | && sbcl --version 85 | 86 | WORKDIR / 87 | 88 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 89 | 90 | ENTRYPOINT ["docker-entrypoint.sh"] 91 | 92 | CMD ["sbcl"] 93 | -------------------------------------------------------------------------------- /2.3.1/alpine3.17/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /2.3.1/bullseye/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM buildpack-deps:bullseye 7 | 8 | ENV SBCL_VERSION 2.3.1 9 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 10 | 11 | WORKDIR /usr/local/src/ 12 | 13 | # hadolint ignore=DL3003,DL3008 14 | RUN set -x \ 15 | && case "$(dpkg --print-architecture)" in \ 16 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 17 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 18 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 19 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 20 | *) echo "Unknown arch" >&2; exit 1;; \ 21 | esac \ 22 | && apt-get update \ 23 | && apt-get install --no-install-recommends -y libzstd-dev \ 24 | && rm -rf /var/lib/apt/lists/* \ 25 | && export SBCL_ARCH \ 26 | && export SBCL_BINARY_ARCH_CODE \ 27 | && export SBCL_BINARY_VERSION \ 28 | && download_and_validate_hashes() { \ 29 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 30 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 31 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 32 | } \ 33 | && download_and_unpack_binary() { \ 34 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 35 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 36 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 37 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 38 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 39 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 40 | } \ 41 | && download_source() { \ 42 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 43 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 44 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 45 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 46 | && sha256sum -c "${1}-sum-file.txt" \ 47 | && tar xf "sbcl-${1}-source.tar" \ 48 | && mv "sbcl-$1" "sbcl"; \ 49 | } \ 50 | && build_and_install_source() { \ 51 | cd "sbcl/" \ 52 | # Remove the hardcoding of armv5 as target arch. Use the default 53 | # provided by the base image. 54 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 55 | # Old versions of SBCL choke. 56 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 57 | && sh make.sh "--xc-host=${1}" --fancy \ 58 | && sh install.sh \ 59 | && sh clean.sh \ 60 | && rm build-debugger-hook.lisp \ 61 | && cd /usr/local/src; \ 62 | } \ 63 | && GNUPGHOME="$(mktemp -d)" \ 64 | && export GNUPGHOME \ 65 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 66 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 67 | && download_and_validate_hashes "$SBCL_VERSION" \ 68 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 69 | && download_source "$SBCL_VERSION" \ 70 | && build_and_install_source "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 71 | && rm -rf "$GNUPGHOME" "$SBCL_BINARY_VERSION-sum-file.txt" "$SBCL_VERSION-sum-file.txt" "sbcl-$SBCL_BINARY_VERSION-crhodes."* "sbcl-$SBCL_VERSION-crhodes."* "sbcl-$SBCL_VERSION-source.tar" "sbcl-$SBCL_BINARY_VERSION-$SBCL_BINARY_ARCH_CODE-linux" \ 72 | && sbcl --version 73 | 74 | # Add the Quicklisp installer. 75 | WORKDIR /usr/local/share/common-lisp/source/quicklisp/ 76 | 77 | ENV QUICKLISP_SIGNING_KEY D7A3489DDEFE32B7D0E7CC61307965AB028B5FF7 78 | 79 | RUN set -x \ 80 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp" > quicklisp.lisp \ 81 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp.asc" > quicklisp.lisp.asc \ 82 | && GNUPGHOME="$(mktemp -d)" \ 83 | && export GNUPGHOME \ 84 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${QUICKLISP_SIGNING_KEY}" \ 85 | && gpg --batch --verify "quicklisp.lisp.asc" "quicklisp.lisp" \ 86 | && rm quicklisp.lisp.asc \ 87 | && rm -rf "$GNUPGHOME" 88 | 89 | # Add the script to trivially install Quicklisp 90 | COPY install-quicklisp /usr/local/bin/install-quicklisp 91 | 92 | # Install cl-launch and rlwrap. In the next release, move this up so that all 93 | # images can share it. 94 | # hadolint ignore=DL3008 95 | RUN set -x \ 96 | && apt-get update \ 97 | && apt-get install --no-install-recommends -y cl-launch rlwrap \ 98 | && rm -rf /var/lib/apt/lists/* 99 | 100 | # Add the entrypoint 101 | WORKDIR / 102 | 103 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 104 | 105 | ENTRYPOINT ["docker-entrypoint.sh"] 106 | 107 | CMD ["sbcl"] 108 | -------------------------------------------------------------------------------- /2.3.1/bullseye/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /2.3.1/bullseye/install-quicklisp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then 4 | QUICKLISP_DIST_VERSION=nil 5 | else 6 | QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\"" 7 | fi 8 | 9 | if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then 10 | QUICKLISP_CLIENT_VERSION=nil 11 | else 12 | QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\"" 13 | fi 14 | 15 | sbcl --non-interactive \ 16 | --load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \ 17 | --eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \ 18 | --eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))" 19 | -------------------------------------------------------------------------------- /2.3.1/bullseye/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM debian:bullseye 7 | 8 | ENV SBCL_VERSION 2.3.1 9 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 10 | 11 | WORKDIR /usr/local/src/ 12 | 13 | # hadolint ignore=DL3003,DL3008 14 | RUN set -x \ 15 | && case "$(dpkg --print-architecture)" in \ 16 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 17 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 18 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 19 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 20 | *) echo "Unknown arch" >&2; exit 1;; \ 21 | esac \ 22 | && export SBCL_ARCH \ 23 | && export SBCL_BINARY_ARCH_CODE \ 24 | && export SBCL_BINARY_VERSION \ 25 | && download_and_validate_hashes() { \ 26 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 27 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 28 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 29 | } \ 30 | && download_and_unpack_binary() { \ 31 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 32 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 33 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 34 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 35 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 36 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 37 | } \ 38 | && download_source() { \ 39 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 40 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 41 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 42 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 43 | && sha256sum -c "${1}-sum-file.txt" \ 44 | && tar xf "sbcl-${1}-source.tar"; \ 45 | } \ 46 | && build_and_install_source() { \ 47 | cd "sbcl-${1}/" \ 48 | # Remove the hardcoding of armv5 as target arch. Use the default 49 | # provided by the base image. 50 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 51 | # Old versions of SBCL choke. 52 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 53 | && sh make.sh "--xc-host=${2}" \ 54 | && sh install.sh \ 55 | && rm build-debugger-hook.lisp \ 56 | && cd /usr/local/src; \ 57 | } \ 58 | && apt-get update \ 59 | && apt-get install -y --no-install-recommends curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 60 | && GNUPGHOME="$(mktemp -d)" \ 61 | && export GNUPGHOME \ 62 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 63 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 64 | && download_and_validate_hashes "$SBCL_VERSION" \ 65 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 66 | && download_source "$SBCL_VERSION" \ 67 | && build_and_install_source "$SBCL_VERSION" "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 68 | && rm -rf "$GNUPGHOME" ./* \ 69 | && apt-get remove -y curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 70 | && apt-get autoremove -y \ 71 | && rm -rf /var/lib/apt/lists/* \ 72 | && sbcl --version 73 | 74 | WORKDIR / 75 | 76 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 77 | 78 | ENTRYPOINT ["docker-entrypoint.sh"] 79 | 80 | CMD ["sbcl"] 81 | -------------------------------------------------------------------------------- /2.3.1/bullseye/slim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /2.3.1/buster/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM buildpack-deps:buster 7 | 8 | ENV SBCL_VERSION 2.3.1 9 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 10 | 11 | WORKDIR /usr/local/src/ 12 | 13 | # hadolint ignore=DL3003,DL3008 14 | RUN set -x \ 15 | && case "$(dpkg --print-architecture)" in \ 16 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 17 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 18 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 19 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 20 | *) echo "Unknown arch" >&2; exit 1;; \ 21 | esac \ 22 | && apt-get update \ 23 | && apt-get install --no-install-recommends -y libzstd-dev \ 24 | && rm -rf /var/lib/apt/lists/* \ 25 | && export SBCL_ARCH \ 26 | && export SBCL_BINARY_ARCH_CODE \ 27 | && export SBCL_BINARY_VERSION \ 28 | && download_and_validate_hashes() { \ 29 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 30 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 31 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 32 | } \ 33 | && download_and_unpack_binary() { \ 34 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 35 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 36 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 37 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 38 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 39 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 40 | } \ 41 | && download_source() { \ 42 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 43 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 44 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 45 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 46 | && sha256sum -c "${1}-sum-file.txt" \ 47 | && tar xf "sbcl-${1}-source.tar" \ 48 | && mv "sbcl-$1" "sbcl"; \ 49 | } \ 50 | && build_and_install_source() { \ 51 | cd "sbcl/" \ 52 | # Remove the hardcoding of armv5 as target arch. Use the default 53 | # provided by the base image. 54 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 55 | # Old versions of SBCL choke. 56 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 57 | && sh make.sh "--xc-host=${1}" --fancy \ 58 | && sh install.sh \ 59 | && sh clean.sh \ 60 | && rm build-debugger-hook.lisp \ 61 | && cd /usr/local/src; \ 62 | } \ 63 | && GNUPGHOME="$(mktemp -d)" \ 64 | && export GNUPGHOME \ 65 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 66 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 67 | && download_and_validate_hashes "$SBCL_VERSION" \ 68 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 69 | && download_source "$SBCL_VERSION" \ 70 | && build_and_install_source "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 71 | && rm -rf "$GNUPGHOME" "$SBCL_BINARY_VERSION-sum-file.txt" "$SBCL_VERSION-sum-file.txt" "sbcl-$SBCL_BINARY_VERSION-crhodes."* "sbcl-$SBCL_VERSION-crhodes."* "sbcl-$SBCL_VERSION-source.tar" "sbcl-$SBCL_BINARY_VERSION-$SBCL_BINARY_ARCH_CODE-linux" \ 72 | && sbcl --version 73 | 74 | # Add the Quicklisp installer. 75 | WORKDIR /usr/local/share/common-lisp/source/quicklisp/ 76 | 77 | ENV QUICKLISP_SIGNING_KEY D7A3489DDEFE32B7D0E7CC61307965AB028B5FF7 78 | 79 | RUN set -x \ 80 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp" > quicklisp.lisp \ 81 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp.asc" > quicklisp.lisp.asc \ 82 | && GNUPGHOME="$(mktemp -d)" \ 83 | && export GNUPGHOME \ 84 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${QUICKLISP_SIGNING_KEY}" \ 85 | && gpg --batch --verify "quicklisp.lisp.asc" "quicklisp.lisp" \ 86 | && rm quicklisp.lisp.asc \ 87 | && rm -rf "$GNUPGHOME" 88 | 89 | # Add the script to trivially install Quicklisp 90 | COPY install-quicklisp /usr/local/bin/install-quicklisp 91 | 92 | # Install cl-launch and rlwrap. In the next release, move this up so that all 93 | # images can share it. 94 | # hadolint ignore=DL3008 95 | RUN set -x \ 96 | && apt-get update \ 97 | && apt-get install --no-install-recommends -y cl-launch rlwrap \ 98 | && rm -rf /var/lib/apt/lists/* 99 | 100 | # Add the entrypoint 101 | WORKDIR / 102 | 103 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 104 | 105 | ENTRYPOINT ["docker-entrypoint.sh"] 106 | 107 | CMD ["sbcl"] 108 | -------------------------------------------------------------------------------- /2.3.1/buster/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /2.3.1/buster/install-quicklisp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then 4 | QUICKLISP_DIST_VERSION=nil 5 | else 6 | QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\"" 7 | fi 8 | 9 | if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then 10 | QUICKLISP_CLIENT_VERSION=nil 11 | else 12 | QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\"" 13 | fi 14 | 15 | sbcl --non-interactive \ 16 | --load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \ 17 | --eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \ 18 | --eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))" 19 | -------------------------------------------------------------------------------- /2.3.1/buster/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM debian:buster 7 | 8 | ENV SBCL_VERSION 2.3.1 9 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 10 | 11 | WORKDIR /usr/local/src/ 12 | 13 | # hadolint ignore=DL3003,DL3008 14 | RUN set -x \ 15 | && case "$(dpkg --print-architecture)" in \ 16 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 17 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 18 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 19 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 20 | *) echo "Unknown arch" >&2; exit 1;; \ 21 | esac \ 22 | && export SBCL_ARCH \ 23 | && export SBCL_BINARY_ARCH_CODE \ 24 | && export SBCL_BINARY_VERSION \ 25 | && download_and_validate_hashes() { \ 26 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 27 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 28 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 29 | } \ 30 | && download_and_unpack_binary() { \ 31 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 32 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 33 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 34 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 35 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 36 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 37 | } \ 38 | && download_source() { \ 39 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 40 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 41 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 42 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 43 | && sha256sum -c "${1}-sum-file.txt" \ 44 | && tar xf "sbcl-${1}-source.tar"; \ 45 | } \ 46 | && build_and_install_source() { \ 47 | cd "sbcl-${1}/" \ 48 | # Remove the hardcoding of armv5 as target arch. Use the default 49 | # provided by the base image. 50 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 51 | # Old versions of SBCL choke. 52 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 53 | && sh make.sh "--xc-host=${2}" \ 54 | && sh install.sh \ 55 | && rm build-debugger-hook.lisp \ 56 | && cd /usr/local/src; \ 57 | } \ 58 | && apt-get update \ 59 | && apt-get install -y --no-install-recommends curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 60 | && GNUPGHOME="$(mktemp -d)" \ 61 | && export GNUPGHOME \ 62 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 63 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 64 | && download_and_validate_hashes "$SBCL_VERSION" \ 65 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 66 | && download_source "$SBCL_VERSION" \ 67 | && build_and_install_source "$SBCL_VERSION" "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 68 | && rm -rf "$GNUPGHOME" ./* \ 69 | && apt-get remove -y curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 70 | && apt-get autoremove -y \ 71 | && rm -rf /var/lib/apt/lists/* \ 72 | && sbcl --version 73 | 74 | WORKDIR / 75 | 76 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 77 | 78 | ENTRYPOINT ["docker-entrypoint.sh"] 79 | 80 | CMD ["sbcl"] 81 | -------------------------------------------------------------------------------- /2.3.1/buster/slim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /2.3.1/windowsservercore-1809/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM mcr.microsoft.com/windows/servercore:1809 7 | 8 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 9 | 10 | ENV MSYS2_VERSION 20210725 11 | 12 | # Install msys and update it. 13 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 14 | Invoke-WebRequest -UseBasicParsing -uri "https://github.com/msys2/msys2-installer/releases/download/2021-07-25/msys2-base-x86_64-$env:MSYS2_VERSION.sfx.exe" -OutFile msys2.exe; \ 15 | .\msys2.exe -y -oC:\; \ 16 | Remove-Item msys2.exe ; \ 17 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 18 | msys ' '; \ 19 | msys 'pacman --noconfirm -Syuu'; \ 20 | msys 'pacman --noconfirm -Syuu'; \ 21 | msys 'pacman --noconfirm -Scc'; \ 22 | \ 23 | echo 'Killing msys2 subprocesses'; \ 24 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 25 | \ 26 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 27 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 28 | 29 | # Install common tools. Eventually make this equivalent to buildpack-deps. 30 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 31 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 32 | $env:CHERE_INVOKING = 'yes'; \ 33 | $env:MSYSTEM = 'MINGW64'; \ 34 | msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-x86_64-zlib git' \ 35 | \ 36 | echo 'Installing WIX.'; \ 37 | Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \ 38 | mkdir wix/bin; \ 39 | cd wix/bin; \ 40 | msys 'unzip ../../wix311-binaries.zip'; \ 41 | cd ../../; \ 42 | rm wix311-binaries.zip; \ 43 | \ 44 | echo 'Killing msys2 subprocesses'; \ 45 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 46 | \ 47 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 48 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 49 | 50 | ENV SBCL_VERSION 2.3.1 51 | ENV SBCL_SOURCE_SHA256 0ad5b600ea3389afe361672a54dc0d17dc519166da501b136b3013b237da049d 52 | 53 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 54 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 55 | $env:CHERE_INVOKING = 'yes'; \ 56 | $env:MSYSTEM = 'MINGW64'; \ 57 | $env:MSYS2_PATH_TYPE = 'inherit'; \ 58 | \ 59 | echo 'Downloading the bootstrap SBCL'; \ 60 | Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi' -OutFile sbcl-bootstrap.msi; \ 61 | Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-bootstrap.msi'; \ 62 | rm sbcl-bootstrap.msi; \ 63 | $env:SBCL_HOME = 'C:\Program Files\Steel Bank Common Lisp\1.4.14\'; \ 64 | $env:PATH = ('C:\Program Files\Steel Bank Common Lisp\1.4.14\;{0}' -f $env:PATH); \ 65 | \ 66 | echo 'Downloading SBCL source'; \ 67 | $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \ 68 | Invoke-WebRequest -Uri $sbclurl -OutFile sbcl-source.tar.bz2 -UserAgent "NativeHost"; \ 69 | $actualsha256 = (Get-FileHash sbcl-source.tar.bz2 -Algorithm sha256).Hash; \ 70 | Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $env:SBCL_SOURCE_SHA256); \ 71 | if ($actualsha256 -ne $env:SBCL_SOURCE_SHA256) { \ 72 | Write-Host 'SHA256 check FAILED!'; \ 73 | exit 1; \ 74 | }; \ 75 | \ 76 | echo 'Unpacking source'; \ 77 | msys 'tar -x -v -f sbcl-source.tar.bz2'; \ 78 | Remove-Item -Force -Path C:\sbcl-source.tar.bz2; \ 79 | cd sbcl-$env:SBCL_VERSION; \ 80 | \ 81 | echo 'Building SBCL'; \ 82 | $env:WIX = '/c/wix'; \ 83 | msys './make.sh --with-sb-linkable-runtime'; \ 84 | msys './make-windows-installer.sh'; \ 85 | cd ..; \ 86 | \ 87 | echo 'Installing SBCL'; \ 88 | cp C:\sbcl-$env:SBCL_VERSION\output\sbcl-$env:SBCL_VERSION-x86-64-windows-binary.msi sbcl-installer.msi; \ 89 | Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-installer.msi'; \ 90 | echo 'Removing SBCL Source'; \ 91 | Remove-Item -Force -Recurse -Path C:\sbcl-$env:SBCL_VERSION; \ 92 | Remove-Item -Force -Path C:\sbcl-installer.msi; \ 93 | \ 94 | echo 'Killing msys2 subprocesses'; \ 95 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 96 | \ 97 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 98 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 99 | 100 | CMD ["sbcl"] 101 | -------------------------------------------------------------------------------- /2.3.1/windowsservercore-ltsc2019/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | FROM mcr.microsoft.com/windows/servercore:ltsc2019 7 | 8 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 9 | 10 | ENV MSYS2_VERSION 20210725 11 | 12 | # Install msys and update it. 13 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 14 | Invoke-WebRequest -UseBasicParsing -uri "https://github.com/msys2/msys2-installer/releases/download/2021-07-25/msys2-base-x86_64-$env:MSYS2_VERSION.sfx.exe" -OutFile msys2.exe; \ 15 | .\msys2.exe -y -oC:\; \ 16 | Remove-Item msys2.exe ; \ 17 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 18 | msys ' '; \ 19 | msys 'pacman --noconfirm -Syuu'; \ 20 | msys 'pacman --noconfirm -Syuu'; \ 21 | msys 'pacman --noconfirm -Scc'; \ 22 | \ 23 | echo 'Killing msys2 subprocesses'; \ 24 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 25 | \ 26 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 27 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 28 | 29 | # Install common tools. Eventually make this equivalent to buildpack-deps. 30 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 31 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 32 | $env:CHERE_INVOKING = 'yes'; \ 33 | $env:MSYSTEM = 'MINGW64'; \ 34 | msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-x86_64-zlib git' \ 35 | \ 36 | echo 'Installing WIX.'; \ 37 | Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \ 38 | mkdir wix/bin; \ 39 | cd wix/bin; \ 40 | msys 'unzip ../../wix311-binaries.zip'; \ 41 | cd ../../; \ 42 | rm wix311-binaries.zip; \ 43 | \ 44 | echo 'Killing msys2 subprocesses'; \ 45 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 46 | \ 47 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 48 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 49 | 50 | ENV SBCL_VERSION 2.3.1 51 | ENV SBCL_SOURCE_SHA256 0ad5b600ea3389afe361672a54dc0d17dc519166da501b136b3013b237da049d 52 | 53 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 54 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 55 | $env:CHERE_INVOKING = 'yes'; \ 56 | $env:MSYSTEM = 'MINGW64'; \ 57 | $env:MSYS2_PATH_TYPE = 'inherit'; \ 58 | \ 59 | echo 'Downloading the bootstrap SBCL'; \ 60 | Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi' -OutFile sbcl-bootstrap.msi; \ 61 | Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-bootstrap.msi'; \ 62 | rm sbcl-bootstrap.msi; \ 63 | $env:SBCL_HOME = 'C:\Program Files\Steel Bank Common Lisp\1.4.14\'; \ 64 | $env:PATH = ('C:\Program Files\Steel Bank Common Lisp\1.4.14\;{0}' -f $env:PATH); \ 65 | \ 66 | echo 'Downloading SBCL source'; \ 67 | $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \ 68 | Invoke-WebRequest -Uri $sbclurl -OutFile sbcl-source.tar.bz2 -UserAgent "NativeHost"; \ 69 | $actualsha256 = (Get-FileHash sbcl-source.tar.bz2 -Algorithm sha256).Hash; \ 70 | Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $env:SBCL_SOURCE_SHA256); \ 71 | if ($actualsha256 -ne $env:SBCL_SOURCE_SHA256) { \ 72 | Write-Host 'SHA256 check FAILED!'; \ 73 | exit 1; \ 74 | }; \ 75 | \ 76 | echo 'Unpacking source'; \ 77 | msys 'tar -x -v -f sbcl-source.tar.bz2'; \ 78 | Remove-Item -Force -Path C:\sbcl-source.tar.bz2; \ 79 | cd sbcl-$env:SBCL_VERSION; \ 80 | \ 81 | echo 'Building SBCL'; \ 82 | $env:WIX = '/c/wix'; \ 83 | msys './make.sh --with-sb-linkable-runtime'; \ 84 | msys './make-windows-installer.sh'; \ 85 | cd ..; \ 86 | \ 87 | echo 'Installing SBCL'; \ 88 | cp C:\sbcl-$env:SBCL_VERSION\output\sbcl-$env:SBCL_VERSION-x86-64-windows-binary.msi sbcl-installer.msi; \ 89 | Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-installer.msi'; \ 90 | echo 'Removing SBCL Source'; \ 91 | Remove-Item -Force -Recurse -Path C:\sbcl-$env:SBCL_VERSION; \ 92 | Remove-Item -Force -Path C:\sbcl-installer.msi; \ 93 | \ 94 | echo 'Killing msys2 subprocesses'; \ 95 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 96 | \ 97 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 98 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 99 | 100 | CMD ["sbcl"] 101 | -------------------------------------------------------------------------------- /CONTRIBUTING: -------------------------------------------------------------------------------- 1 | Please read https://common-lisp.net/project/cl-docker-images/contributing.html 2 | before contributing to this project. -------------------------------------------------------------------------------- /Dockerfile-apk-nightly.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | ENV SBCL_COMMIT PLACEHOLDER 4 | ENV SBCL_VERSION PLACEHOLDER 5 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 6 | 7 | WORKDIR /usr/local/src/ 8 | 9 | # hadolint ignore=DL3003,DL3018 10 | RUN set -x \ 11 | && case "$(cat /etc/apk/arch)" in \ 12 | # We use ECL to build because the version of SBCL in the edge repo doesn't 13 | # work for armv7 (edge has updated musl libc incompatibly). 14 | armv7) \ 15 | SBCL_ARCH=arm; \ 16 | if grep "3.12" /etc/issue 2>/dev/null >/dev/null ; then \ 17 | HOST_LISP="ecl"; \ 18 | ECL_VERSION=20.4.24; \ 19 | export ECL_VERSION; \ 20 | else \ 21 | HOST_LISP="sbcl"; \ 22 | fi \ 23 | ;; \ 24 | aarch64) SBCL_ARCH=arm64; HOST_LISP="sbcl";; \ 25 | x86_64) SBCL_ARCH=x86-64; HOST_LISP="sbcl";; \ 26 | *) echo "Unknown arch" >&2; exit 1;; \ 27 | esac \ 28 | && export SBCL_ARCH \ 29 | && download_source() { \ 30 | url="https://github.com/sbcl/sbcl/archive/$1.tar.gz" \ 31 | && curl -fsSL "$url" > "sbcl-${1}.tar.gz" \ 32 | && tar xf "sbcl-${1}.tar.gz"; \ 33 | } \ 34 | && build_and_install_source() { \ 35 | cd "sbcl-${1}/" \ 36 | && echo "\"$SBCL_VERSION\"" > version.lisp-expr \ 37 | # Remove the hardcoding of armv5 as target arch. Use the default 38 | # provided by the base image. 39 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 40 | && sh make.sh "--xc-host=${2}" \ 41 | && sh install.sh \ 42 | && cd /usr/local/src; \ 43 | } \ 44 | && if [ "$HOST_LISP" = "ecl" ]; then \ 45 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 46 | gmp-dev libffi-dev \ 47 | && curl -fsSL https://common-lisp.net/project/ecl/static/files/release/ecl-$ECL_VERSION.tgz > ecl-$ECL_VERSION.tgz \ 48 | && echo "4c127e0d6a99e38f3a926135ae92d92899058c5a5e99b90f28d4a47b58d94ee89a958cfb4bfd2b9e6ad7b3c57867cd13119b2a4dd6bb1aa3bb5ec42a96bfa788 ecl-20.4.24.tgz" | sha512sum -c \ 49 | && gunzip ecl-${ECL_VERSION}.tgz \ 50 | && tar xf ecl-${ECL_VERSION}.tar \ 51 | && (cd ecl-${ECL_VERSION} && ./configure --disable-manual && make -j "$(nproc)" && make install); \ 52 | else \ 53 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 54 | && apk add --no-cache sbcl --repository http://dl-3.alpinelinux.org/alpine/edge/community/; \ 55 | fi \ 56 | && download_source "$SBCL_COMMIT" \ 57 | && build_and_install_source "$SBCL_COMMIT" "$HOST_LISP" \ 58 | && if [ "$HOST_LISP" = "ecl" ]; then \ 59 | (cd ecl-${ECL_VERSION} && make uninstall) \ 60 | && apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 61 | gmp-dev libffi-dev; \ 62 | else \ 63 | apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers sbcl; \ 64 | fi \ 65 | && sbcl --version 66 | 67 | WORKDIR / 68 | 69 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 70 | 71 | ENTRYPOINT ["docker-entrypoint.sh"] 72 | 73 | CMD ["sbcl"] 74 | -------------------------------------------------------------------------------- /Dockerfile-apk.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | ENV SBCL_VERSION PLACEHOLDER 4 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 5 | 6 | WORKDIR /usr/local/src/ 7 | 8 | # hadolint ignore=DL3003,DL3018 9 | RUN set -x \ 10 | && case "$(cat /etc/apk/arch)" in \ 11 | # We use ECL to build because the version of SBCL in the edge repo doesn't 12 | # work for armv7 (edge has updated musl libc incompatibly). 13 | armv7) \ 14 | SBCL_ARCH=arm; \ 15 | if grep "3.12" /etc/issue 2>/dev/null >/dev/null ; then \ 16 | HOST_LISP="ecl"; \ 17 | ECL_VERSION=20.4.24; \ 18 | export ECL_VERSION; \ 19 | else \ 20 | HOST_LISP="sbcl"; \ 21 | fi \ 22 | ;; \ 23 | aarch64) SBCL_ARCH=arm64; HOST_LISP="sbcl";; \ 24 | x86_64) SBCL_ARCH=x86-64; HOST_LISP="sbcl";; \ 25 | *) echo "Unknown arch" >&2; exit 1;; \ 26 | esac \ 27 | && export SBCL_ARCH \ 28 | && import_key() { \ 29 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$1"; \ 30 | } \ 31 | && download_and_validate_hashes() { \ 32 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 33 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 34 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 35 | } \ 36 | && download_source() { \ 37 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 38 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 39 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 40 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 41 | && sha256sum -c "${1}-sum-file.txt" \ 42 | && tar xf "sbcl-${1}-source.tar"; \ 43 | } \ 44 | && build_and_install_source() { \ 45 | cd "sbcl-${1}/" \ 46 | # Remove the hardcoding of armv5 as target arch. Use the default 47 | # provided by the base image. 48 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 49 | && sh make.sh "--xc-host=${2}" \ 50 | && sh install.sh \ 51 | && cd /usr/local/src; \ 52 | } \ 53 | && if [ "$HOST_LISP" = "ecl" ]; then \ 54 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 55 | gmp-dev libffi-dev gnupg \ 56 | && curl -fsSL https://common-lisp.net/project/ecl/static/files/release/ecl-$ECL_VERSION.tgz > ecl-$ECL_VERSION.tgz \ 57 | && echo "4c127e0d6a99e38f3a926135ae92d92899058c5a5e99b90f28d4a47b58d94ee89a958cfb4bfd2b9e6ad7b3c57867cd13119b2a4dd6bb1aa3bb5ec42a96bfa788 ecl-20.4.24.tgz" | sha512sum -c \ 58 | && gunzip ecl-${ECL_VERSION}.tgz \ 59 | && tar xf ecl-${ECL_VERSION}.tar \ 60 | && (cd ecl-${ECL_VERSION} && ./configure --disable-manual && make -j "$(nproc)" && make install); \ 61 | else \ 62 | apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg \ 63 | && apk add --no-cache sbcl --repository http://dl-3.alpinelinux.org/alpine/edge/community/; \ 64 | fi \ 65 | && GNUPGHOME="$(mktemp -d)" \ 66 | && export GNUPGHOME \ 67 | && import_key "$SBCL_SIGNING_KEY" \ 68 | && download_and_validate_hashes "$SBCL_VERSION" \ 69 | && download_source "$SBCL_VERSION" \ 70 | && build_and_install_source "$SBCL_VERSION" "$HOST_LISP" \ 71 | && if [ "$HOST_LISP" = "ecl" ]; then \ 72 | (cd ecl-${ECL_VERSION} && make uninstall) \ 73 | && apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers \ 74 | gmp-dev libffi-dev gnupg; \ 75 | else \ 76 | apk del --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg sbcl; \ 77 | fi \ 78 | && rm -rf "$GNUPGHOME" ./* \ 79 | && sbcl --version 80 | 81 | WORKDIR / 82 | 83 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 84 | 85 | ENTRYPOINT ["docker-entrypoint.sh"] 86 | 87 | CMD ["sbcl"] 88 | -------------------------------------------------------------------------------- /Dockerfile-apt-nightly.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | ENV SBCL_COMMIT PLACEHOLDER 4 | ENV SBCL_VERSION PLACEHOLDER 5 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 6 | 7 | WORKDIR /usr/local/src/ 8 | 9 | # hadolint ignore=DL3003,DL3008 10 | RUN set -x \ 11 | && case "$(dpkg --print-architecture)" in \ 12 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 13 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 14 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 15 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 16 | *) echo "Unknown arch" >&2; exit 1;; \ 17 | esac \ 18 | && apt-get update \ 19 | && apt-get install --no-install-recommends -y libzstd-dev \ 20 | && rm -rf /var/lib/apt/lists/* \ 21 | && export SBCL_ARCH \ 22 | && export SBCL_BINARY_ARCH_CODE \ 23 | && export SBCL_BINARY_VERSION \ 24 | && download_and_validate_hashes() { \ 25 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 26 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 27 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 28 | } \ 29 | && download_and_unpack_binary() { \ 30 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 31 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 32 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 33 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 34 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 35 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 36 | } \ 37 | && download_source() { \ 38 | url="https://github.com/sbcl/sbcl/archive/$1.tar.gz" \ 39 | && curl -fsSL "$url" > "sbcl-${1}.tar.gz" \ 40 | && tar xf "sbcl-${1}.tar.gz" \ 41 | && mv "sbcl-$1" "sbcl"; \ 42 | } \ 43 | && build_and_install_source() { \ 44 | cd "sbcl/" \ 45 | && echo "\"$SBCL_VERSION\"" > version.lisp-expr \ 46 | # Remove the hardcoding of armv5 as target arch. Use the default 47 | # provided by the base image. 48 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 49 | # Old versions of SBCL choke. 50 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 51 | && sh make.sh "--xc-host=${1}" --fancy \ 52 | && sh install.sh \ 53 | && sh clean.sh \ 54 | && rm build-debugger-hook.lisp \ 55 | && cd /usr/local/src; \ 56 | } \ 57 | && GNUPGHOME="$(mktemp -d)" \ 58 | && export GNUPGHOME \ 59 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 60 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 61 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 62 | && download_source "$SBCL_COMMIT" \ 63 | && build_and_install_source "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 64 | && rm -rf "$GNUPGHOME" "sbcl-$SBCL_COMMIT.tar.gz" "sbcl-$SBCL_BINARY_VERSION-crhodes."* "sbcl-$SBCL_BINARY_VERSION-$SBCL_BINARY_ARCH_CODE-linux" "$SBCL_BINARY_VERSION-sum-file.txt" \ 65 | && sbcl --version 66 | 67 | # Add the Quicklisp installer. 68 | WORKDIR /usr/local/share/common-lisp/source/quicklisp/ 69 | 70 | ENV QUICKLISP_SIGNING_KEY D7A3489DDEFE32B7D0E7CC61307965AB028B5FF7 71 | 72 | RUN set -x \ 73 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp" > quicklisp.lisp \ 74 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp.asc" > quicklisp.lisp.asc \ 75 | && GNUPGHOME="$(mktemp -d)" \ 76 | && export GNUPGHOME \ 77 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${QUICKLISP_SIGNING_KEY}" \ 78 | && gpg --batch --verify "quicklisp.lisp.asc" "quicklisp.lisp" \ 79 | && rm quicklisp.lisp.asc \ 80 | && rm -rf "$GNUPGHOME" 81 | 82 | # Add the script to trivially install Quicklisp 83 | COPY install-quicklisp /usr/local/bin/install-quicklisp 84 | 85 | # Install cl-launch. In the next release, move this up so that all images can 86 | # share it. 87 | # hadolint ignore=DL3008 88 | RUN set -x \ 89 | && apt-get update \ 90 | && apt-get install --no-install-recommends -y cl-launch \ 91 | && rm -rf /var/lib/apt/lists/* 92 | 93 | # Add the entrypoint 94 | WORKDIR / 95 | 96 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 97 | 98 | ENTRYPOINT ["docker-entrypoint.sh"] 99 | 100 | CMD ["sbcl"] 101 | -------------------------------------------------------------------------------- /Dockerfile-apt-slim-nightly.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | ENV SBCL_COMMIT PLACEHOLDER 4 | ENV SBCL_VERSION PLACEHOLDER 5 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 6 | 7 | WORKDIR /usr/local/src/ 8 | 9 | # hadolint ignore=DL3003,DL3008 10 | RUN set -x \ 11 | && case "$(dpkg --print-architecture)" in \ 12 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 13 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 14 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 15 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 16 | *) echo "Unknown arch" >&2; exit 1;; \ 17 | esac \ 18 | && export SBCL_ARCH \ 19 | && export SBCL_BINARY_ARCH_CODE \ 20 | && export SBCL_BINARY_VERSION \ 21 | && download_and_validate_hashes() { \ 22 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 23 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 24 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 25 | } \ 26 | && download_and_unpack_binary() { \ 27 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 28 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 29 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 30 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 31 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 32 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 33 | } \ 34 | && download_source() { \ 35 | url="https://github.com/sbcl/sbcl/archive/$1.tar.gz" \ 36 | && curl -fsSL "$url" > "sbcl-${1}.tar.gz" \ 37 | && tar xf "sbcl-${1}.tar.gz"; \ 38 | } \ 39 | && build_and_install_source() { \ 40 | cd "sbcl-$1/" \ 41 | && echo "\"$SBCL_VERSION\"" > version.lisp-expr \ 42 | # Remove the hardcoding of armv5 as target arch. Use the default 43 | # provided by the base image. 44 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 45 | # Old versions of SBCL choke. 46 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 47 | && sh make.sh "--xc-host=${2}" \ 48 | && sh install.sh \ 49 | && rm build-debugger-hook.lisp \ 50 | && cd /usr/local/src; \ 51 | } \ 52 | && apt-get update \ 53 | && apt-get install -y --no-install-recommends curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 54 | && GNUPGHOME="$(mktemp -d)" \ 55 | && export GNUPGHOME \ 56 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 57 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 58 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 59 | && download_source "$SBCL_COMMIT" \ 60 | && build_and_install_source "$SBCL_COMMIT" "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 61 | && rm -rf "$GNUPGHOME" ./* \ 62 | && apt-get remove -y curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 63 | && apt-get autoremove -y \ 64 | && rm -rf /var/lib/apt/lists/* \ 65 | && sbcl --version 66 | 67 | WORKDIR / 68 | 69 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 70 | 71 | ENTRYPOINT ["docker-entrypoint.sh"] 72 | 73 | CMD ["sbcl"] 74 | -------------------------------------------------------------------------------- /Dockerfile-apt-slim.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | ENV SBCL_VERSION PLACEHOLDER 4 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 5 | 6 | WORKDIR /usr/local/src/ 7 | 8 | # hadolint ignore=DL3003,DL3008 9 | RUN set -x \ 10 | && case "$(dpkg --print-architecture)" in \ 11 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 12 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 13 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 14 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 15 | *) echo "Unknown arch" >&2; exit 1;; \ 16 | esac \ 17 | && export SBCL_ARCH \ 18 | && export SBCL_BINARY_ARCH_CODE \ 19 | && export SBCL_BINARY_VERSION \ 20 | && download_and_validate_hashes() { \ 21 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 22 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 23 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 24 | } \ 25 | && download_and_unpack_binary() { \ 26 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 27 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 28 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 29 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 30 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 31 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 32 | } \ 33 | && download_source() { \ 34 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 35 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 36 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 37 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 38 | && sha256sum -c "${1}-sum-file.txt" \ 39 | && tar xf "sbcl-${1}-source.tar"; \ 40 | } \ 41 | && build_and_install_source() { \ 42 | cd "sbcl-${1}/" \ 43 | # Remove the hardcoding of armv5 as target arch. Use the default 44 | # provided by the base image. 45 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 46 | # Old versions of SBCL choke. 47 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 48 | && sh make.sh "--xc-host=${2}" \ 49 | && sh install.sh \ 50 | && rm build-debugger-hook.lisp \ 51 | && cd /usr/local/src; \ 52 | } \ 53 | && apt-get update \ 54 | && apt-get install -y --no-install-recommends curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 55 | && GNUPGHOME="$(mktemp -d)" \ 56 | && export GNUPGHOME \ 57 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 58 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 59 | && download_and_validate_hashes "$SBCL_VERSION" \ 60 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 61 | && download_source "$SBCL_VERSION" \ 62 | && build_and_install_source "$SBCL_VERSION" "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 63 | && rm -rf "$GNUPGHOME" ./* \ 64 | && apt-get remove -y curl gnupg ca-certificates make dirmngr bzip2 build-essential libzstd-dev \ 65 | && apt-get autoremove -y \ 66 | && rm -rf /var/lib/apt/lists/* \ 67 | && sbcl --version 68 | 69 | WORKDIR / 70 | 71 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 72 | 73 | ENTRYPOINT ["docker-entrypoint.sh"] 74 | 75 | CMD ["sbcl"] 76 | -------------------------------------------------------------------------------- /Dockerfile-apt.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | ENV SBCL_VERSION PLACEHOLDER 4 | ENV SBCL_SIGNING_KEY D6839CA0A67F74D9DFB70922EBD595A9100D63CD 5 | 6 | WORKDIR /usr/local/src/ 7 | 8 | # hadolint ignore=DL3003,DL3008 9 | RUN set -x \ 10 | && case "$(dpkg --print-architecture)" in \ 11 | armhf) SBCL_ARCH=arm; SBCL_BINARY_ARCH_CODE=armhf; SBCL_BINARY_VERSION=1.4.11;; \ 12 | arm64) SBCL_ARCH=arm64; SBCL_BINARY_ARCH_CODE=arm64; SBCL_BINARY_VERSION=1.4.2;; \ 13 | # Limit to 1.5.5 because that's when the glibc version used to build was bumped 14 | amd64) SBCL_ARCH=x86-64; SBCL_BINARY_ARCH_CODE=x86-64; SBCL_BINARY_VERSION=1.5.5;; \ 15 | *) echo "Unknown arch" >&2; exit 1;; \ 16 | esac \ 17 | && apt-get update \ 18 | && apt-get install --no-install-recommends -y libzstd-dev \ 19 | && rm -rf /var/lib/apt/lists/* \ 20 | && export SBCL_ARCH \ 21 | && export SBCL_BINARY_ARCH_CODE \ 22 | && export SBCL_BINARY_VERSION \ 23 | && download_and_validate_hashes() { \ 24 | curl -fsSL "https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.asc" \ 25 | && gpg --batch --verify "sbcl-${1}-crhodes.asc" \ 26 | && gpg --batch --decrypt "sbcl-${1}-crhodes.asc" > "sbcl-${1}-crhodes.txt"; \ 27 | } \ 28 | && download_and_unpack_binary() { \ 29 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 30 | && curl -fsSL "$url" > "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 31 | && bunzip2 "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar.bz2" \ 32 | && if grep "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt"; then sha256sum -c "${1}-sum-file.txt"; fi \ 33 | && tar xf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar" \ 34 | && rm -rf "sbcl-${1}-$SBCL_BINARY_ARCH_CODE-linux-binary.tar"; \ 35 | } \ 36 | && download_source() { \ 37 | url="https://downloads.sourceforge.net/project/sbcl/sbcl/${1}/sbcl-${1}-source.tar.bz2" \ 38 | && curl -fsSL "$url" > "sbcl-${1}-source.tar.bz2" \ 39 | && bunzip2 "sbcl-${1}-source.tar.bz2" \ 40 | && grep "sbcl-${1}-source.tar" "sbcl-${1}-crhodes.txt" > "${1}-sum-file.txt" \ 41 | && sha256sum -c "${1}-sum-file.txt" \ 42 | && tar xf "sbcl-${1}-source.tar" \ 43 | && mv "sbcl-$1" "sbcl"; \ 44 | } \ 45 | && build_and_install_source() { \ 46 | cd "sbcl/" \ 47 | # Remove the hardcoding of armv5 as target arch. Use the default 48 | # provided by the base image. 49 | && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ 50 | # Old versions of SBCL choke. 51 | && echo "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (let ((restart (find-restart 'continue c))) (when restart (invoke-restart restart)))))" > build-debugger-hook.lisp \ 52 | && sh make.sh "--xc-host=${1}" --fancy \ 53 | && sh install.sh \ 54 | && sh clean.sh \ 55 | && rm build-debugger-hook.lisp \ 56 | && cd /usr/local/src; \ 57 | } \ 58 | && GNUPGHOME="$(mktemp -d)" \ 59 | && export GNUPGHOME \ 60 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${SBCL_SIGNING_KEY} \ 61 | && download_and_validate_hashes "$SBCL_BINARY_VERSION" \ 62 | && download_and_validate_hashes "$SBCL_VERSION" \ 63 | && download_and_unpack_binary "$SBCL_BINARY_VERSION" \ 64 | && download_source "$SBCL_VERSION" \ 65 | && build_and_install_source "/usr/local/src/sbcl-${SBCL_BINARY_VERSION}-$SBCL_BINARY_ARCH_CODE-linux/run-sbcl.sh --load build-debugger-hook.lisp" \ 66 | && rm -rf "$GNUPGHOME" "$SBCL_BINARY_VERSION-sum-file.txt" "$SBCL_VERSION-sum-file.txt" "sbcl-$SBCL_BINARY_VERSION-crhodes."* "sbcl-$SBCL_VERSION-crhodes."* "sbcl-$SBCL_VERSION-source.tar" "sbcl-$SBCL_BINARY_VERSION-$SBCL_BINARY_ARCH_CODE-linux" \ 67 | && sbcl --version 68 | 69 | # Add the Quicklisp installer. 70 | WORKDIR /usr/local/share/common-lisp/source/quicklisp/ 71 | 72 | ENV QUICKLISP_SIGNING_KEY D7A3489DDEFE32B7D0E7CC61307965AB028B5FF7 73 | 74 | RUN set -x \ 75 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp" > quicklisp.lisp \ 76 | && curl -fsSL "https://beta.quicklisp.org/quicklisp.lisp.asc" > quicklisp.lisp.asc \ 77 | && GNUPGHOME="$(mktemp -d)" \ 78 | && export GNUPGHOME \ 79 | && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${QUICKLISP_SIGNING_KEY}" \ 80 | && gpg --batch --verify "quicklisp.lisp.asc" "quicklisp.lisp" \ 81 | && rm quicklisp.lisp.asc \ 82 | && rm -rf "$GNUPGHOME" 83 | 84 | # Add the script to trivially install Quicklisp 85 | COPY install-quicklisp /usr/local/bin/install-quicklisp 86 | 87 | # Install cl-launch and rlwrap. In the next release, move this up so that all 88 | # images can share it. 89 | # hadolint ignore=DL3008 90 | RUN set -x \ 91 | && apt-get update \ 92 | && apt-get install --no-install-recommends -y cl-launch rlwrap \ 93 | && rm -rf /var/lib/apt/lists/* 94 | 95 | # Add the entrypoint 96 | WORKDIR / 97 | 98 | COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 99 | 100 | ENTRYPOINT ["docker-entrypoint.sh"] 101 | 102 | CMD ["sbcl"] 103 | -------------------------------------------------------------------------------- /Dockerfile-windowsservercore.template: -------------------------------------------------------------------------------- 1 | FROM PLACEHOLDER 2 | 3 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 4 | 5 | ENV MSYS2_VERSION 20210725 6 | 7 | # Install msys and update it. 8 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 9 | Invoke-WebRequest -UseBasicParsing -uri "https://github.com/msys2/msys2-installer/releases/download/2021-07-25/msys2-base-x86_64-$env:MSYS2_VERSION.sfx.exe" -OutFile msys2.exe; \ 10 | .\msys2.exe -y -oC:\; \ 11 | Remove-Item msys2.exe ; \ 12 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 13 | msys ' '; \ 14 | msys 'pacman --noconfirm -Syuu'; \ 15 | msys 'pacman --noconfirm -Syuu'; \ 16 | msys 'pacman --noconfirm -Scc'; \ 17 | \ 18 | echo 'Killing msys2 subprocesses'; \ 19 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 20 | \ 21 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 22 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 23 | 24 | # Install common tools. Eventually make this equivalent to buildpack-deps. 25 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 26 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 27 | $env:CHERE_INVOKING = 'yes'; \ 28 | $env:MSYSTEM = 'MINGW64'; \ 29 | msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-x86_64-zlib git' \ 30 | \ 31 | echo 'Installing WIX.'; \ 32 | Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \ 33 | mkdir wix/bin; \ 34 | cd wix/bin; \ 35 | msys 'unzip ../../wix311-binaries.zip'; \ 36 | cd ../../; \ 37 | rm wix311-binaries.zip; \ 38 | \ 39 | echo 'Killing msys2 subprocesses'; \ 40 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 41 | \ 42 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 43 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 44 | 45 | ENV SBCL_VERSION PLACEHOLDER 46 | ENV SBCL_SOURCE_SHA256 PLACEHOLDER 47 | 48 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ 49 | function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ 50 | $env:CHERE_INVOKING = 'yes'; \ 51 | $env:MSYSTEM = 'MINGW64'; \ 52 | $env:MSYS2_PATH_TYPE = 'inherit'; \ 53 | \ 54 | echo 'Downloading the bootstrap SBCL'; \ 55 | Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi' -OutFile sbcl-bootstrap.msi; \ 56 | Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-bootstrap.msi'; \ 57 | rm sbcl-bootstrap.msi; \ 58 | $env:SBCL_HOME = 'C:\Program Files\Steel Bank Common Lisp\1.4.14\'; \ 59 | $env:PATH = ('C:\Program Files\Steel Bank Common Lisp\1.4.14\;{0}' -f $env:PATH); \ 60 | \ 61 | echo 'Downloading SBCL source'; \ 62 | $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \ 63 | Invoke-WebRequest -Uri $sbclurl -OutFile sbcl-source.tar.bz2 -UserAgent "NativeHost"; \ 64 | $actualsha256 = (Get-FileHash sbcl-source.tar.bz2 -Algorithm sha256).Hash; \ 65 | Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $env:SBCL_SOURCE_SHA256); \ 66 | if ($actualsha256 -ne $env:SBCL_SOURCE_SHA256) { \ 67 | Write-Host 'SHA256 check FAILED!'; \ 68 | exit 1; \ 69 | }; \ 70 | \ 71 | echo 'Unpacking source'; \ 72 | msys 'tar -x -v -f sbcl-source.tar.bz2'; \ 73 | Remove-Item -Force -Path C:\sbcl-source.tar.bz2; \ 74 | cd sbcl-$env:SBCL_VERSION; \ 75 | \ 76 | echo 'Building SBCL'; \ 77 | $env:WIX = '/c/wix'; \ 78 | msys './make.sh --with-sb-linkable-runtime'; \ 79 | msys './make-windows-installer.sh'; \ 80 | cd ..; \ 81 | \ 82 | echo 'Installing SBCL'; \ 83 | cp C:\sbcl-$env:SBCL_VERSION\output\sbcl-$env:SBCL_VERSION-x86-64-windows-binary.msi sbcl-installer.msi; \ 84 | Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-installer.msi'; \ 85 | echo 'Removing SBCL Source'; \ 86 | Remove-Item -Force -Recurse -Path C:\sbcl-$env:SBCL_VERSION; \ 87 | Remove-Item -Force -Path C:\sbcl-installer.msi; \ 88 | \ 89 | echo 'Killing msys2 subprocesses'; \ 90 | taskkill /F /FI 'MODULES eq msys-2.0.dll'; \ 91 | \ 92 | echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \ 93 | If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; }; 94 | 95 | CMD ["sbcl"] 96 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2020, Eric Timmons 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: SBCL Docker Images 2 | 3 | This project contains Docker images to build SBCL and the infrastructure to 4 | build the images. 5 | 6 | This repository is mirrored between both 7 | [[https://gitlab.common-lisp.net/cl-docker-images/sbcl]] and 8 | [[https://github.com/cl-docker-images/sbcl]]. 9 | 10 | * Unofficial images 11 | 12 | Currently, all images defined on the =master= branch are built and pushed to 13 | =daewok/sbcl= and =clfoundation/sbcl= on Docker Hub. 14 | 15 | * Releasing a new version 16 | 17 | When a new version of SBCL is released, perform the following steps: 18 | 19 | 1. Run the following command to generate the Dockerfiles: 20 | 21 | #+begin_src shell 22 | ./update.sh $SBCL_VERSION_NUMBER 23 | #+end_src 24 | 25 | 2. Remove all folders for SBCL versions that are no longer 26 | supported. Reminder: the corresponding tags are *not* removed from 27 | Dockerhub, they will just no longer be automatically built. 28 | 29 | 3. Update the version aliases as necessary in 30 | [[file:generate-stackbrew-library.sh]]. 31 | 32 | 4. Open a merge request on 33 | [[https://gitlab.common-lisp.net/cl-docker-images/sbcl]] (preferred) or 34 | [[https://github.com/cl-docker-images/sbcl]]. 35 | -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # If the first arg starts with a hyphen, prepend sbcl to arguments. 4 | if [ "${1#-}" != "$1" ]; then 5 | set -- sbcl "$@" 6 | fi 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /extract-nightly-commit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | grep -e "^ENV SBCL_COMMIT" nightly/bullseye/Dockerfile | cut -d" " -f 3 6 | -------------------------------------------------------------------------------- /generate-readme.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -Eeuo pipefail 3 | 4 | declare -A sharedTags 5 | declare -a simpleTags=() 6 | 7 | while read -r line; do 8 | if [[ "$line" == "Tags: "* ]]; then 9 | line="${line#Tags: }" 10 | line="$(echo "$line" | tr -d ,)" 11 | canonicalTag="${line%% *}" 12 | simpleTags+=( "$line" ) 13 | elif [[ "$line" == "SharedTags: "* ]]; then 14 | line="${line#SharedTags: }" 15 | line="$(echo "$line" | tr -d ,)" 16 | for sharedTag in $line; do 17 | if [ -z "${sharedTags[$sharedTag]+set}" ]; then 18 | sharedTags[$sharedTag]="$canonicalTag" 19 | else 20 | sharedTags[$sharedTag]="${sharedTags[$sharedTag]} $canonicalTag" 21 | fi 22 | 23 | done 24 | else 25 | unset canonicalTag 26 | fi 27 | done 28 | 29 | simpleTagSection="" 30 | 31 | for line in "${simpleTags[@]}"; do 32 | simpleTagSection="$simpleTagSection- " 33 | for tag in $line; do 34 | simpleTagSection="$simpleTagSection \`$tag\`" 35 | done 36 | simpleTagSection="$simpleTagSection 37 | " 38 | done 39 | 40 | sharedTagSection="" 41 | declare -A skip=() 42 | 43 | for sharedTag in "${!sharedTags[@]}"; do 44 | [ -z "${skip[$sharedTag]+set}" ] || continue 45 | 46 | sharedTagSection="$sharedTagSection- \`$sharedTag\`" 47 | 48 | for sharedTag2 in "${!sharedTags[@]}"; do 49 | ! [ "$sharedTag" = "$sharedTag2" ] || continue 50 | if [ "${sharedTags[$sharedTag]}" = "${sharedTags[$sharedTag2]}" ]; then 51 | skip[$sharedTag2]="yes" 52 | sharedTagSection="$sharedTagSection, \`$sharedTag2\`" 53 | fi 54 | done 55 | sharedTagSection="$sharedTagSection 56 | " 57 | 58 | for tag in ${sharedTags[$sharedTag]}; do 59 | sharedTagSection="$sharedTagSection - \`$tag\` 60 | " 61 | done 62 | done 63 | 64 | awk -v r="$simpleTagSection" '{gsub(/INSERT-SIMPLE-TAGS/,r)}1' hub-description-template.md | awk -v r="$sharedTagSection" '{gsub(/INSERT-SHARED-TAGS/,r)}1' | sed -e "s,%%IMAGE%%,$1,g" 65 | -------------------------------------------------------------------------------- /generate-stackbrew-library.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -Eeuo pipefail 3 | 4 | declare -A aliases=( 5 | [2.3.1]='latest' 6 | ) 7 | 8 | defaultDebianSuite='bullseye' 9 | 10 | self="$(basename "$BASH_SOURCE")" 11 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 12 | 13 | if [ "${1-unset}" = "rc" ]; then 14 | versions=( *rc/ ) 15 | versions=( "${versions[@]%/}" ) 16 | elif [ "${1-unset}" = "all" ]; then 17 | versions=( */ ) 18 | versions=( "${versions[@]%/}" ) 19 | else 20 | versions=( */ ) 21 | versions=( "${versions[@]%/}" ) 22 | versions=( "${versions[@]%%*rc}" ) 23 | fi 24 | 25 | # sort version numbers with highest first 26 | IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -rV) ); unset IFS 27 | 28 | # get the most recent commit which modified any of "$@" 29 | fileCommit() { 30 | git log -1 --format='format:%H' HEAD -- "$@" 31 | } 32 | 33 | # get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" 34 | dirCommit() { 35 | local dir="$1"; shift 36 | ( 37 | cd "$dir" 38 | fileCommit \ 39 | Dockerfile \ 40 | $(git show HEAD:./Dockerfile | awk ' 41 | toupper($1) == "COPY" { 42 | for (i = 2; i < NF; i++) { 43 | print $i 44 | } 45 | } 46 | ') 47 | ) 48 | } 49 | 50 | getArches() { 51 | local repo="$1"; shift 52 | local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/' 53 | 54 | eval "declare -g -A parentRepoToArches=( $( 55 | find -name 'Dockerfile' -exec awk ' 56 | toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { 57 | print "'"$officialImagesUrl"'" $2 58 | } 59 | ' '{}' + \ 60 | | sort -u \ 61 | | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"' 62 | ) )" 63 | } 64 | # getArches 'sbcl' 65 | 66 | declare -g -A parentRepoToArches=( 67 | [alpine:3.14]="amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le s390x" 68 | [alpine:3.15]="amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le s390x" 69 | [buildpack-deps:bullseye]="amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le s390x" 70 | [buildpack-deps:buster]="amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le s390x" 71 | [debian:bullseye]="amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le s390x" 72 | [debian:buster]="amd64 arm32v6 arm32v7 arm64v8 i386 ppc64le s390x" 73 | ) 74 | 75 | cat <<-EOH 76 | # this file is generated via https://github.com/cl-docker-images/sbcl/blob/$(fileCommit "$self")/$self 77 | Maintainers: Eric Timmons (@daewok) 78 | GitRepo: https://github.com/cl-docker-images/sbcl.git 79 | EOH 80 | 81 | # prints "$2$1$3$1...$N" 82 | join() { 83 | local sep="$1"; shift 84 | local out; printf -v out "${sep//%/%%}%s" "$@" 85 | echo "${out#$sep}" 86 | } 87 | 88 | for version in "${versions[@]}"; do 89 | 90 | for v in \ 91 | bullseye/{,slim} \ 92 | buster/{,slim} \ 93 | alpine3.15/ \ 94 | alpine3.14/ \ 95 | windowsservercore-{1809,ltsc2019}/ \ 96 | ; do 97 | os="${v%%/*}" 98 | variant="${v#*/}" 99 | if [ -n "$variant" ]; then 100 | variantTag="-$variant" 101 | else 102 | variantTag="" 103 | fi 104 | 105 | dir="$version/$v" 106 | 107 | if [[ "$version" == *rc ]]; then 108 | if [[ "$os" == "windowsservercore"* ]] || [ "$variant" = slim ]; then 109 | continue 110 | fi 111 | fi 112 | 113 | [ -f "$dir/Dockerfile" ] || continue 114 | 115 | commit="$(dirCommit "$dir")" 116 | 117 | versionAliases=( 118 | $version 119 | ${aliases[$version]:-} 120 | ) 121 | 122 | variantAliases=( "${versionAliases[@]/%/$variantTag-$os}" ) 123 | variantAliases=( "${variantAliases[@]//latest-/}" ) 124 | 125 | case "$os" in 126 | windows*) variantArches='windows-amd64' ;; 127 | *) 128 | variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")" 129 | parentArches="${parentRepoToArches[$variantParent]:-}" 130 | variantArches= 131 | for arch in $parentArches; do 132 | if echo "$arch" | grep -E "amd64|arm32v7|arm64v8" > /dev/null; then 133 | if [ "$arch" == "arm32v7" ] && [ "$os" == "alpine3.12" ]; then 134 | continue 135 | fi 136 | variantArches+=" $arch" 137 | fi 138 | done 139 | ;; 140 | esac 141 | 142 | sharedTags=() 143 | 144 | if [ "$os" = "$defaultDebianSuite" ] || [[ "$os" == 'windowsservercore'* ]]; then 145 | sharedTags+=( "${versionAliases[@]/%/$variantTag}" ) 146 | 147 | if [[ "$os" == "windowsservercore"* ]]; then 148 | sharedTags+=( "${versionAliases[@]/%/-windowsservercore$variantTag}") 149 | fi 150 | fi 151 | 152 | sharedTags=( "${sharedTags[@]//latest-/}" ) 153 | parentRepoToArches["daewok/sbcl:${variantAliases[0]}"]="${variantArches[*]}" 154 | 155 | echo 156 | echo "Tags: $(join ', ' "${variantAliases[@]}")" 157 | if [ "${#sharedTags[@]}" -gt 0 ]; then 158 | echo "SharedTags: $(join ', ' "${sharedTags[@]}")" 159 | fi 160 | cat <<-EOE 161 | Architectures: $(join ', ' $variantArches) 162 | GitCommit: $commit 163 | Directory: $dir 164 | EOE 165 | [[ "$os" == "windows"* ]] && echo "Constraints: $os" 166 | done 167 | done 168 | -------------------------------------------------------------------------------- /hub-description-template.md: -------------------------------------------------------------------------------- 1 | - [Supported Tags](#org270ff05) 2 | - [Simple Tags](#org7740dc5) 3 | - [Shared Tags](#org99f332f) 4 | - [Quick Reference](#orgfe4abeb) 5 | - [What is SBCL?](#org616c5bd) 6 | - [How to use this image](#orge60c990) 7 | - [Create a `Dockerfile` in your SBCL project](#org44f646c) 8 | - [Run a single Common Lisp script](#org099cc26) 9 | - [Developing using SLIME](#orgfa276fd) 10 | - [What's in the image?](#org3e8366b) 11 | - [Image variants](#org47c820a) 12 | - [`%%IMAGE%%:`](#orgf2cf1db) 13 | - [`%%IMAGE%%:-slim`](#orgfc15c8c) 14 | - [`%%IMAGE%%:-alpine`](#org8d4837e) 15 | - [`%%IMAGE%%:-windowsservercore`](#org563afc8) 16 | - [License](#orgead3ba9) 17 | 18 | 19 | 20 | 21 | 22 | # Supported Tags 23 | 24 | 25 | 26 | 27 | ## Simple Tags 28 | 29 | INSERT-SIMPLE-TAGS 30 | 31 | 32 | 33 | 34 | ## Shared Tags 35 | 36 | INSERT-SHARED-TAGS 37 | 38 | 39 | 40 | 41 | # Quick Reference 42 | 43 | - **SBCL Home Page:** [http://sbcl.org](http://sbcl.org) 44 | - **Where to file Docker image related issues:** 45 | - **Where to file issues for SBCL itself:** [https://bugs.launchpad.net/sbcl](https://bugs.launchpad.net/sbcl) 46 | - **Maintained by:** [CL Docker Images Project](https://common-lisp.net/project/cl-docker-images) 47 | - **Supported platforms:** `linux/amd64`, `linux/arm64/v8`, `linux/arm/v7`, `windows/amd64` 48 | 49 | 50 | 51 | 52 | # What is SBCL? 53 | 54 | From [SBCL's Home Page](http://sbcl.org): 55 | 56 | > Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler. It is open source / free software, with a permissive license. In addition to the compiler and runtime system for ANSI Common Lisp, it provides an interactive environment including a debugger, a statistical profiler, a code coverage tool, and many other extensions. 57 | 58 | 59 | 60 | 61 | # How to use this image 62 | 63 | 64 | 65 | 66 | ## Create a `Dockerfile` in your SBCL project 67 | 68 | ```dockerfile 69 | FROM %%IMAGE%%:latest 70 | COPY . /usr/src/app 71 | WORKDIR /usr/src/app 72 | CMD [ "sbcl", "--load", "./your-daemon-or-script.lisp" ] 73 | ``` 74 | 75 | You can then build and run the Docker image: 76 | 77 | ```console 78 | $ docker build -t my-sbcl-app 79 | $ docker run -it --rm --name my-running-app my-sbcl-app 80 | ``` 81 | 82 | 83 | 84 | 85 | ## Run a single Common Lisp script 86 | 87 | For many simple, single file projects, you may find it inconvenient to write a complete \`Dockerfile\`. In such cases, you can run a Lisp script by using the SBCL Docker image directly: 88 | 89 | ```console 90 | $ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%%:latest sbcl --load ./your-daemon-or-script.lisp 91 | ``` 92 | 93 | 94 | 95 | 96 | ## Developing using SLIME 97 | 98 | [SLIME](https://common-lisp.net/project/slime/) provides a convenient and fun environment for hacking on Common Lisp. To develop using SLIME, first start the Swank server in a container: 99 | 100 | ```console 101 | $ docker run -it --rm --name sbcl-slime -p 127.0.0.1:4005:4005 -v /path/to/slime:/usr/src/slime -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%%:latest sbcl --load /usr/src/slime/swank-loader.lisp --eval '(swank-loader:init)' --eval '(swank:create-server :dont-close t :interface "0.0.0.0")' 102 | ``` 103 | 104 | Then, in an Emacs instance with slime loaded, type: 105 | 106 | ```emacs 107 | M-x slime-connect RET RET RET 108 | ``` 109 | 110 | 111 | 112 | 113 | # What's in the image? 114 | 115 | This image contains SBCL binaries built from the latest source code released by the SBCL devs for a variety of OSes and architectures. 116 | 117 | Currently, the only modification made to the SBCL source code when building is to remove `-march=armv5` from the `CFLAGS` on 32-bit ARM targets. This is done because recent gcc versions (like the ones in Alpine 3.11 and 3.12) no longer support this target and it can create suboptimal binaries for armv7 (which is the explicit target of these Docker images). This issue has been [reported upstream](https://bugs.launchpad.net/sbcl/+bug/1839783). 118 | 119 | 120 | 121 | 122 | # Image variants 123 | 124 | This image comes in several variants, each designed for a specific use case. 125 | 126 | 127 | 128 | 129 | ## `%%IMAGE%%:` 130 | 131 | This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. The included SBCL binary was built with the `--fancy` flag. Additionally, these images contain the SBCL source code (at `/usr/local/src/sbcl`) to help facilitate interactive development and exploration (a hallmark of Common Lisp!). 132 | 133 | Some of these tags may have names like bullseye or buster in them. These are the suite code names for releases of Debian and indicate which release the image is based on. If your image needs to install any additional packages beyond what comes with the image, you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Debian. 134 | 135 | These images are built off the buildpack-deps image. It, by design, has a large number of extremely common Debian packages. 136 | 137 | These images contain the Quicklisp installer, located at `/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp`. Additionally, there is a script at `/usr/local/bin/install-quicklisp` that will use the bundled installer to install Quicklisp. You can configure the Quicklisp install with the following environment variables: 138 | 139 | - **`QUICKLISP_DIST_VERSION`:** The dist version to use. Of the form yyyy-mm-dd. `latest` means to install the latest version (the default). 140 | - **`QUICKLISP_CLIENT_VERSION`:** The client version to use. Of the form yyyy-mm-dd. `latest` means to install the latest version (the default). 141 | - **`QUICKLISP_ADD_TO_INIT_FILE`:** If set to `true`, `(ql:add-to-init-file)` is used to add code to the implementation's user init file to load Quicklisp on startup. Not set by default. 142 | 143 | Additionally, these images contain cl-launch to provide a uniform interface to running a Lisp implementation without caring exactly which implementation is being used (for instance to have uniform CI scripts). 144 | 145 | 146 | 147 | 148 | ## `%%IMAGE%%:-slim` 149 | 150 | This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run SBCL. Unless you are working in an environment where only this image will be deployed and you have space constraints, we highly recommend using the default image of this repository. 151 | 152 | 153 | 154 | 155 | ## `%%IMAGE%%:-alpine` 156 | 157 | This image is based on the popular [Alpine Linux project](https://alpinelinux.org/), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. 158 | 159 | This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](https://musl.libc.org/) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. 160 | 161 | To minimize image size, it's uncommon for additional related tools (such as git or bash) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [alpine image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). 162 | 163 | 164 | 165 | 166 | ## `%%IMAGE%%:-windowsservercore` 167 | 168 | This image is based on [Windows Server Core (`microsoft/windowsservercore`)](https://hub.docker.com/_/microsoft-windows-servercore). As such, it only works in places which that image does, such as Windows 10 Professional/Enterprise (Anniversary Edition) or Windows Server 2016. 169 | 170 | This image contains msys2 along with some common packages used for building foreign code. The goal is to have foreign packages installed to make it equivalent to default Debian images. If there's something missing, please open an issue! 171 | 172 | For information about how to get Docker running on Windows, please see the relevant "Quick Start" guide provided by Microsoft: 173 | 174 | - [Windows Server Quick Start](https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server) 175 | - [Windows 10 Quick Start](https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10) 176 | 177 | 178 | 179 | 180 | # License 181 | 182 | SBCL is licensed using a mix of BSD-style and public domain licenses. See SBCL's [COPYING](http://sbcl.git.sourceforge.net/git/gitweb.cgi?p=sbcl/sbcl.git;a=blob_plain;f=COPYING;hb=HEAD) file for more info. 183 | 184 | The Dockerfiles used to build the images are licensed under BSD-2-Clause. 185 | 186 | As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). 187 | 188 | As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. 189 | -------------------------------------------------------------------------------- /hub-description-template.org: -------------------------------------------------------------------------------- 1 | #+TITLE: SBCL Docker Images 2 | #+AUTHOR: Eric Timmons 3 | 4 | * Supported Tags 5 | 6 | ** Simple Tags 7 | 8 | INSERT-SIMPLE-TAGS 9 | 10 | ** Shared Tags 11 | 12 | INSERT-SHARED-TAGS 13 | 14 | * Quick Reference 15 | 16 | + SBCL Home Page :: [[http://sbcl.org][http://sbcl.org]] 17 | + Where to file Docker image related issues :: [[https://gitlab.common-lisp.net/cl-docker-images/sbcl]] 18 | + Where to file issues for SBCL itself :: [[https://bugs.launchpad.net/sbcl][https://bugs.launchpad.net/sbcl]] 19 | + Maintained by :: [[https://common-lisp.net/project/cl-docker-images][CL Docker Images Project]] 20 | + Supported platforms :: =linux/amd64=, =linux/arm64/v8=, =linux/arm/v7=, =windows/amd64= 21 | 22 | * What is SBCL? 23 | 24 | From [[http://sbcl.org][SBCL's Home Page]]: 25 | 26 | #+begin_quote 27 | Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler. It 28 | is open source / free software, with a permissive license. In addition to the 29 | compiler and runtime system for ANSI Common Lisp, it provides an interactive 30 | environment including a debugger, a statistical profiler, a code coverage 31 | tool, and many other extensions. 32 | #+end_quote 33 | 34 | * How to use this image 35 | 36 | ** Create a =Dockerfile= in your SBCL project 37 | 38 | #+begin_src dockerfile 39 | FROM %%IMAGE%%:latest 40 | COPY . /usr/src/app 41 | WORKDIR /usr/src/app 42 | CMD [ "sbcl", "--load", "./your-daemon-or-script.lisp" ] 43 | #+end_src 44 | 45 | You can then build and run the Docker image: 46 | 47 | #+begin_src console 48 | $ docker build -t my-sbcl-app 49 | $ docker run -it --rm --name my-running-app my-sbcl-app 50 | #+end_src 51 | 52 | ** Run a single Common Lisp script 53 | 54 | For many simple, single file projects, you may find it inconvenient to write 55 | a complete `Dockerfile`. In such cases, you can run a Lisp script by using 56 | the SBCL Docker image directly: 57 | 58 | #+begin_src console 59 | $ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%%:latest sbcl --load ./your-daemon-or-script.lisp 60 | #+end_src 61 | 62 | ** Developing using SLIME 63 | 64 | [[https://common-lisp.net/project/slime/][SLIME]] provides a convenient and fun environment for hacking on Common 65 | Lisp. To develop using SLIME, first start the Swank server in a container: 66 | 67 | #+begin_src console 68 | $ docker run -it --rm --name sbcl-slime -p 127.0.0.1:4005:4005 -v /path/to/slime:/usr/src/slime -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%%:latest sbcl --load /usr/src/slime/swank-loader.lisp --eval '(swank-loader:init)' --eval '(swank:create-server :dont-close t :interface "0.0.0.0")' 69 | #+end_src 70 | 71 | Then, in an Emacs instance with slime loaded, type: 72 | 73 | #+begin_src emacs 74 | M-x slime-connect RET RET RET 75 | #+end_src 76 | 77 | 78 | * What's in the image? 79 | 80 | This image contains SBCL binaries built from the latest source code released 81 | by the SBCL devs for a variety of OSes and architectures. 82 | 83 | Currently, the only modification made to the SBCL source code when building 84 | is to remove =-march=armv5= from the =CFLAGS= on 32-bit ARM targets. This is 85 | done because recent gcc versions (like the ones in Alpine 3.11 and 3.12) no 86 | longer support this target and it can create suboptimal binaries for armv7 87 | (which is the explicit target of these Docker images). This issue has been 88 | [[https://bugs.launchpad.net/sbcl/+bug/1839783][reported upstream]]. 89 | 90 | * Image variants 91 | 92 | This image comes in several variants, each designed for a specific use case. 93 | 94 | ** =%%IMAGE%%:= 95 | 96 | This is the defacto image. If you are unsure about what your needs are, you 97 | probably want to use this one. It is designed to be used both as a throw 98 | away container (mount your source code and start the container to start your 99 | app), as well as the base to build other images off of. The included SBCL 100 | binary was built with the =--fancy= flag. Additionally, these images contain 101 | the SBCL source code (at =/usr/local/src/sbcl=) to help facilitate 102 | interactive development and exploration (a hallmark of Common Lisp!). 103 | 104 | Some of these tags may have names like bullseye or buster in them. These are 105 | the suite code names for releases of Debian and indicate which release the 106 | image is based on. If your image needs to install any additional packages 107 | beyond what comes with the image, you'll likely want to specify one of these 108 | explicitly to minimize breakage when there are new releases of Debian. 109 | 110 | These images are built off the buildpack-deps image. It, by design, has a 111 | large number of extremely common Debian packages. 112 | 113 | These images contain the Quicklisp installer, located at 114 | =/usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp=. Additionally, 115 | there is a script at =/usr/local/bin/install-quicklisp= that will use the 116 | bundled installer to install Quicklisp. You can configure the Quicklisp 117 | install with the following environment variables: 118 | 119 | + =QUICKLISP_DIST_VERSION= :: The dist version to use. Of the form 120 | yyyy-mm-dd. =latest= means to install the latest version (the default). 121 | + =QUICKLISP_CLIENT_VERSION= :: The client version to use. Of the form 122 | yyyy-mm-dd. =latest= means to install the latest version (the default). 123 | + =QUICKLISP_ADD_TO_INIT_FILE= :: If set to =true=, =(ql:add-to-init-file)= 124 | is used to add code to the implementation's user init file to load 125 | Quicklisp on startup. Not set by default. 126 | 127 | Additionally, these images contain cl-launch to provide a uniform interface 128 | to running a Lisp implementation without caring exactly which implementation 129 | is being used (for instance to have uniform CI scripts). 130 | 131 | ** =%%IMAGE%%:-slim= 132 | 133 | This image does not contain the common packages contained in the default tag 134 | and only contains the minimal packages needed to run SBCL. Unless you are 135 | working in an environment where only this image will be deployed and you 136 | have space constraints, we highly recommend using the default image of this 137 | repository. 138 | 139 | ** =%%IMAGE%%:-alpine= 140 | 141 | This image is based on the popular [[https://alpinelinux.org/][Alpine Linux project]], available in [[https://hub.docker.com/_/alpine][the 142 | =alpine= official image]]. Alpine Linux is much smaller than most distribution 143 | base images (~5MB), and thus leads to much slimmer images in general. 144 | 145 | This variant is highly recommended when final image size being as small as 146 | possible is desired. The main caveat to note is that it does use [[https://musl.libc.org/][musl libc]] 147 | instead of [[https://www.etalabs.net/compare_libcs.html][glibc and friends]], so certain software might run into issues 148 | depending on the depth of their libc requirements. However, most software 149 | doesn't have an issue with this, so this variant is usually a very safe 150 | choice. See [[https://news.ycombinator.com/item?id=10782897][this Hacker News comment thread]] for more discussion of the 151 | issues that might arise and some pro/con comparisons of using Alpine-based 152 | images. 153 | 154 | To minimize image size, it's uncommon for additional related tools (such as 155 | git or bash) to be included in Alpine-based images. Using this image as a 156 | base, add the things you need in your own Dockerfile (see the [[https://hub.docker.com/_/alpine/][alpine image 157 | description]] for examples of how to install packages if you are unfamiliar). 158 | 159 | ** =%%IMAGE%%:-windowsservercore= 160 | 161 | This image is based on [[https://hub.docker.com/_/microsoft-windows-servercore][Windows Server Core 162 | (=microsoft/windowsservercore=)]]. As such, it only works in places which that 163 | image does, such as Windows 10 Professional/Enterprise (Anniversary Edition) 164 | or Windows Server 2016. 165 | 166 | This image contains msys2 along with some common packages used for building 167 | foreign code. The goal is to have foreign packages installed to make it 168 | equivalent to default Debian images. If there's something missing, please 169 | open an issue! 170 | 171 | For information about how to get Docker running on Windows, please see the 172 | relevant "Quick Start" guide provided by Microsoft: 173 | 174 | + [[https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server][Windows Server Quick Start]] 175 | + [[https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10][Windows 10 Quick Start]] 176 | 177 | * License 178 | 179 | SBCL is licensed using a mix of BSD-style and public domain licenses. See 180 | SBCL's [[http://sbcl.git.sourceforge.net/git/gitweb.cgi?p=sbcl/sbcl.git;a=blob_plain;f=COPYING;hb=HEAD][COPYING]] file for more info. 181 | 182 | The Dockerfiles used to build the images are licensed under BSD-2-Clause. 183 | 184 | As with all Docker images, these likely also contain other software which may 185 | be under other licenses (such as Bash, etc from the base distribution, along 186 | with any direct or indirect dependencies of the primary software being 187 | contained). 188 | 189 | As for any pre-built image usage, it is the image user's responsibility to 190 | ensure that any use of this image complies with any relevant licenses for all 191 | software contained within. 192 | -------------------------------------------------------------------------------- /install-quicklisp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$QUICKLISP_DIST_VERSION" ] || [ "$QUICKLISP_DIST_VERSION" = "latest" ]; then 4 | QUICKLISP_DIST_VERSION=nil 5 | else 6 | QUICKLISP_DIST_VERSION="\"quicklisp/$QUICKLISP_DIST_VERSION\"" 7 | fi 8 | 9 | if [ -z "$QUICKLISP_CLIENT_VERSION" ] || [ "$QUICKLISP_CLIENT_VERSION" = "latest" ]; then 10 | QUICKLISP_CLIENT_VERSION=nil 11 | else 12 | QUICKLISP_CLIENT_VERSION="\"$QUICKLISP_CLIENT_VERSION\"" 13 | fi 14 | 15 | sbcl --non-interactive \ 16 | --load /usr/local/share/common-lisp/source/quicklisp/quicklisp.lisp \ 17 | --eval "(quicklisp-quickstart:install :dist-version $QUICKLISP_DIST_VERSION :client-version $QUICKLISP_CLIENT_VERSION)" \ 18 | --eval "(when (equalp \"$QUICKLISP_ADD_TO_INIT_FILE\" \"true\") (ql-util:without-prompting (ql:add-to-init-file)))" 19 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -Eeuo pipefail 3 | 4 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 5 | 6 | declare -A refs=( 7 | [2.3.2-rc]='master' 8 | ) 9 | 10 | versions=( "$@" ) 11 | 12 | generated_warning() { 13 | cat < "$dir/Dockerfile" 95 | 96 | if [[ "$version" == *rc ]]; then 97 | sed -ri \ 98 | -e 's,^(FROM) .*,\1 '"$from"',' \ 99 | -e 's/^(ENV SBCL_VERSION) .*/\1 '"$sbclGitVersion"'/' \ 100 | -e 's/^(ENV SBCL_COMMIT) .*/\1 '"$sbclGitSha"'/' \ 101 | "$dir/Dockerfile" 102 | else 103 | sed -ri \ 104 | -e 's/^(ENV SBCL_VERSION) .*/\1 '"$version"'/' \ 105 | -e 's/^(ENV SBCL_SOURCE_SHA256) .*/\1 '"$sbclSourceSha"'/' \ 106 | -e 's,^(FROM) .*,\1 '"$from"',' \ 107 | "$dir/Dockerfile" 108 | fi 109 | done 110 | done 111 | --------------------------------------------------------------------------------