The Crystal Programming Language Forum

Crystal multi-arch docker images available

Multi-architecture docker images are now available at Docker Hub. They’re are build daily by a Github Action.

These images uses the fact that alpine have (outdated) builds of crystal in their repository, for multiple architectures, so we use that compile to build the latest (or any version, it’s configurable) of Crystal, and then using a multi-layer approach copy that resulting binaries to a fresh alpine image (to not leave behind unnecessary crystal build dependencies).

For our software we normally use a multi-stage process to build static binaries into a scratch image, see example: websocket-tcp-relay/Dockerfile at main · cloudamqp/websocket-tcp-relay · GitHub

But we also use the 84codes/crystal:1.1.1-ubuntu-* images to build deb packages: websocket-tcp-relay/Dockerfile.deb at main · cloudamqp/websocket-tcp-relay · GitHub