Alpine Linux includes the Crystal compiler in the community repository, starting from version Alpine 3.7.

Currently, the package is only available for aarch64 and x86_64 platforms.

Install

apk add crystal shards