Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/ crystal-alpine Public archive

the crystal compiler and other stuff on top of Alpine

License

Notifications You must be signed in to change notification settings

e-graveyard/crystal-alpine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized Crystal on Alpine

Crystal

The Crystal compiler, the Shards package manager and various complementary development headers on top of Alpine Linux.

Build Status GitHub tag

  • Build essential packages
  • Development headers for:
    • GNU C
    • ZLib
    • OpenSSL
    • ReadLine Docker
    • GNU GMP
    • YAML
    • XML
  • Crystal compiler (version 0.27.2)
  • Shards (version 0.8.1)

Rationale

The Crystal programming language already have an official Docker image at crystallang/crystal --- the image being based on Ubuntu 16.04. The Static Linking feature, however, is currently only supported on Alpine Linux. This image brings the Crystal compiler and other stuff to Alpine, so you can make static-linked binaries.

Usage

  • You can build yourself:
docker build -t crystal .
  • Or pull from DockerHub:
docker pull caian/crystal:0.27.2-alpine
  • Use to build very minimal Docker images of Crystal applications:
FROM caian/crystal:0.27.2-alpine AS build

COPY . /src
WORKDIR /src
RUN shards install
RUN crystal build --release --static app.cr -o app

FROM scratch AS run
COPY --from=build /src/app /app
ENTRYPOINT ["/app"]

License

To the extent possible under law, Caian Rais Ertl has waived all copyright and related or neighboring rights to this work.

License

About

the crystal compiler and other stuff on top of Alpine

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published