Shell script for running crystal via the official crystal-lang docker images.
Get docker-crystal.sh
(clone this repo or download).
Ensure that it's executable.
chmod +x ./docker-crystal.sh
Add it to you PATH
ln -s $(pwd)/docker-crystal.sh ~/bin/docker-crystal
Use docker-crystal
in the exact same way you would use the crystal
command.
docker-crystal spec
docker-crystal build
In place of using (or even requiring) a locally installed version, it will spin up an ephemeral container.
The version used is (in order of priority) CRYSTAL_VERSION
env var, the crystal version in shard.yml
, or latest
.
Any build artifacts or docs generated will appear in the local file system as though they had been built natively.