Sign inSign up

clfoundation/ecl

By clfoundation

•Updated about 24 hours ago

Embeddable Common Lisp

Image
2

10K+

clfoundation/ecl repository overview

⁠Supported Tags

⁠Simple Tags

  • 2a14414 2a14414-alpine3.12 2a14414-alpine3.13 2a14414-buster 2a14414-slim 2a14414-slim-buster 2a14414-slim-stretch 2a14414-stretch
  • 2cac964 2cac964-alpine3.11 2cac964-alpine3.12 2cac964-buster 2cac964-slim 2cac964-slim-buster 2cac964-slim-stretch 2cac964-stretch
  • 3b7efbb 3b7efbb-alpine3.11 3b7efbb-alpine3.12 3b7efbb-buster 3b7efbb-slim 3b7efbb-slim-buster 3b7efbb-slim-stretch 3b7efbb-stretch
  • 6ff3b2b 6ff3b2b-alpine3.11 6ff3b2b-alpine3.12 6ff3b2b-buster 6ff3b2b-slim 6ff3b2b-slim-buster 6ff3b2b-slim-stretch 6ff3b2b-stretch
  • 9e20446 9e20446-alpine3.12 9e20446-alpine3.13 9e20446-buster 9e20446-slim 9e20446-slim-buster 9e20446-slim-stretch 9e20446-stretch
  • 20.4.24 20.4.24-alpine3.11 20.4.24-alpine3.12 20.4.24-alpine3.13 20.4.24-buster 20.4.24-slim 20.4.24-slim-buster 20.4.24-slim-stretch 20.4.24-stretch
  • 21.2.1 21.2.1-alpine3.12 21.2.1-alpine3.13 21.2.1-alpine3.14 21.2.1-bullseye 21.2.1-buster 21.2.1-slim 21.2.1-slim-bullseye 21.2.1-slim-buster 21.2.1-slim-stretch 21.2.1-stretch
  • 24.5.10 24.5.10-alpine3.21 24.5.10-alpine3.22 24.5.10-bookworm 24.5.10-bookworm-slim 24.5.10-trixie 24.5.10-trixie-slim
  • 26.5.5 26.5.5-alpine3.21 26.5.5-alpine3.22 26.5.5-bookworm 26.5.5-bookworm-slim 26.5.5-trixie 26.5.5-trixie-slim
  • 36a9c95 36a9c95-alpine3.12 36a9c95-alpine3.13 36a9c95-buster 36a9c95-slim 36a9c95-slim-buster 36a9c95-slim-stretch 36a9c95-stretch
  • 69e9e1d 69e9e1d-alpine3.12 69e9e1d-alpine3.13 69e9e1d-buster 69e9e1d-slim 69e9e1d-slim-buster 69e9e1d-slim-stretch 69e9e1d-stretch
  • 74e366c 74e366c-alpine3.11 74e366c-alpine3.12 74e366c-buster 74e366c-slim 74e366c-slim-buster 74e366c-slim-stretch 74e366c-stretch
  • 83ed2e1 83ed2e1-alpine3.12 83ed2e1-alpine3.13 83ed2e1-buster 83ed2e1-slim 83ed2e1-slim-buster 83ed2e1-slim-stretch 83ed2e1-stretch
  • 594d47f 594d47f-alpine3.11 594d47f-alpine3.12 594d47f-buster 594d47f-slim 594d47f-slim-buster 594d47f-slim-stretch 594d47f-stretch
  • 788b9b4 788b9b4-alpine3.12 788b9b4-alpine3.13 788b9b4-buster 788b9b4-slim 788b9b4-slim-buster 788b9b4-slim-stretch 788b9b4-stretch
  • 8428d6a 8428d6a-alpine3.12 8428d6a-alpine3.13 8428d6a-buster 8428d6a-slim 8428d6a-slim-buster 8428d6a-slim-stretch 8428d6a-stretch
  • 19780e2 19780e2-alpine3.12 19780e2-alpine3.13 19780e2-buster 19780e2-slim 19780e2-slim-buster 19780e2-slim-stretch 19780e2-stretch

⁠Shared Tags

  • latest
    • 19780e2

⁠Quick Reference

⁠What is ECL?

From ECL's Home Page⁠:

ECL (Embeddable Common-Lisp) is an interpreter of the Common-Lisp language as described in the X3J13 Ansi specification, featuring CLOS (Common-Lisp Object System), conditions, loops, etc, plus a translator to C, which can produce standalone executables.

ECL supports the operating systems Linux, FreeBSD, NetBSD, OpenBSD, OS X, Solaris, Windows, iOS and Android, running on top of the Intel, Sparc, Alpha, PowerPC and ARM processors.

⁠How to use this image

⁠Create a Dockerfile in your ECL project

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

You can then build and run the Docker image:

$ docker build -t my-ecl-app
$ docker run -it --rm --name my-running-app my-ecl-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 ECL Docker image directly:

$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app clfoundation/ecl:latest ecl --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 ecl-slime -p 127.0.0.1:4005:4005 -v /path/to/slime:/usr/src/slime -v "$PWD":/usr/src/app -w /usr/src/app clfoundation/ecl:latest ecl --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 ECL binaries built from the latest source releases from the ECL devs for a variety of OSes and architectures.

⁠Image variants

This image comes in several variants, each designed for a specific use case.

⁠clfoundation/ecl:<version>

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. Additionally, these images contain the ECL source code (at /usr/local/src/ecl) to help facilitate interactive development and exploration (a hallmark of Common Lisp!).

Some of these tags may have names like trixie or bookworm 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.

These images are built off the buildpack-deps image. It, by design, has a large number of extremely common Debian packages.

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:

  • QUICKLISP_DIST_VERSION: The dist version to use. Of the form yyyy-mm-dd. latest means to install the latest version (the default).
  • QUICKLISP_CLIENT_VERSION: The client version to use. Of the form yyyy-mm-dd. latest means to install the latest version (the default).
  • 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.

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

⁠clfoundation/ecl:<version>-slim

This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run ECL. 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.

⁠clfoundation/ecl:<version>-alpine

This image is based on the popular Alpine Linux project⁠, available in the alpine official image⁠. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

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⁠ instead of glibc and friends⁠, 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⁠ for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.

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⁠ for examples of how to install packages if you are unfamiliar).

⁠License

ECL is mostly licensed under the GNU LGPL v2+⁠.

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

sha256:9a1c4aa2d…

Size

386.6 MB

Last updated

about 24 hours ago

docker pull clfoundation/ecl