Crystal in Docker on Linux



crystal
docker run --rm -it -w/opt -v$(pwd):/opt crystallang/crystal crystal $*

Alternative:

Start docker container:


docker run --rm -it -w/opt -v$(pwd):/opt --name crystal -d crystallang/crystal tail -f /opt/Dockerfile

Execute in the running container:


docker exec crystal crystal examples/intro/hello_world.cr

Later you can stop the container:


docker -t0 stop crystal