A Docker image is a piece of executable code that produces some output given some input.
- Docker
First, build the base images and builtins.
./scripts/build-base
./scripts/build-builtinsThen, run the tests. Be patient.
./scripts/run-testsRun eval to evaluate expressions.
./scripts/run eval "(cons 1 2)"Pass --trace to run to see all calls.
./scripts/run --trace eval "(car (cdr (cons 1 (cons 2 (list)))))"You can also use docker stats and docker events to watch evaluation.
You can write programs:
FROM docker-lisp/eval
CMD ["(define fact (lambda (n) (if (number-equals n 0) 1 (multiply n (fact (subtract n 1))))))", "(fact 3)"]Build them with
./scripts/build <program path> [name]or
./scripts/build <program path> # Uses the filename if no name is specifiedThen run with
./scripts/run <name>| Script | Purpose |
|---|---|
build <file> [name] |
Build a Dockerfile into docker-lisp/<name>. Defaults to basename. |
build-base |
Build base images (docker-lisp/base-racket, docker-lisp/base-call) |
build-builtins |
Build all builtin images |
run [--trace] [--no-cleanup] <image> [args] |
Run a docker-lisp/<image> container |
run-tests [--no-trace] [--rebuild-base] [prefix filter] |
Run the tests (with traces by default) |
clean |
Kill all docker-lisp/* containers and remove all built docker-lisp/* images |