[Help][Docker] Installing Crystal inside a docker container on mac m1 pro chip


I have Mac powered by M1 Pro Chip.
I’m trying to install crystal inside a debian11 docker container.
Result → It doesn’t work for me… the crystal executable is not installed.
So, this guide doesn’t work for me - Install On Debian - The Crystal Programming Language

Steps to reproduce:

  1. docker run --rm -it debian bash
  2. apt update && apt install curl
  3. curl -fsSL https://crystal-lang.org/install.sh | bash
  4. crystal → bash: crystal: command not found

Any suggestions?

Thanks, for checking

I guess you must reload current login shell after you install it if this is just a $PATH issue.


$: source ~/.bashrc


$: source ~/.bash_profile

Then try again.

Is the docker image aarch64 or x86_64 architecture?
If aarch64, the installer can’t find any package because there are currently no pre-built aarch64 debian packages available. But it should show an error in that case.
The installer should definitely print some output. Does it show anything to you?

1 Like

Thanks for the reply,
yeah, the architecture is “arm64” for the image

It prints that it can’t find crystal to install it.

Any suggestion of how to resolve it and install the crystal?

Is it hard to configure CI to prebuilt the package for “arm64” architecture?
Maybe I can volunteer there)

Could you make use of 84codes/crystal - Packages · packagecloud?

1 Like