Sign inSign up

daewok/static-sbcl

By daewok

Updated over 4 years ago

SBCL built with patches to enable static executable support

Image
0

4.6K

daewok/static-sbcl repository overview

Supported Tags

Simple Tags

  • 2.2.0-buster buster
  • 2.2.0-bullseye bullseye
  • 2.2.0-alpine3.14 alpine3.14
  • 2.2.0-alpine3.15 alpine3.15

Shared Tags

  • latest, 2.2.0
    • 2.2.0-bullseye

Quick Reference

What is SBCL?

From SBCL's Home Page:

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.

How to use this image

Create a Dockerfile in your SBCL project

FROM daewok/static-sbcl:latest
COPY . /usr/src/app
WORKDIR /usr/src/app
CMD [ "sbcl", "--load", "./your-daemon-or-script.lisp" ]

You can then build and run the Docker image:

$ docker build -t my-sbcl-app
$ docker run -it --rm --name my-running-app my-sbcl-app

Run a single Common Lisp script

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:

$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app daewok/static-sbcl:latest sbcl --load ./your-daemon-or-script.lisp

Developing using SLIME

SLIME provides a convenient and fun environment for hacking on Common Lisp. To develop using SLIME, first start the Swank server in a container:

$ 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 daewok/static-sbcl: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")'

Then, in an Emacs instance with slime loaded, type:

M-x slime-connect RET RET RET

What's in the image?

This image contains SBCL binaries built with –with-sb-linkable-runtime and –sn-prelink-linkage-table. The latter is provided by a series of patches described at https://www.timmons.dev/posts/static-executables-with-sbcl-v2.html. The goal is to get these patches (or equivalent) merged upstream and then stop supporting these images.

License

SBCL is licensed using a mix of BSD-style and public domain licenses. See SBCL's COPYING file for more info.

The Dockerfiles used to build the images are licensed under BSD-2-Clause.

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).

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.

Tag summary

Content type

Image

Digest

Size

329 MB

Last updated

over 4 years ago

docker pull daewok/static-sbcl