brew install crystal
crystal helloworld.cr
We need to build the statically linked binary using alpine linux. So we are using docker:
docker run --rm -it -v $PWD:/workspace -w /workspace crystallang/crystal:0.32.1-alpine crystal build helloworld.cr --static
or just use the includes build script
./build
docker build -t helloworld .
docker run --name helloworld helloworld