crystal_docker

A sample minimal Crystal program, with associated Dockerfile

Build docker image

docker build -t crystal-http:0.1 .
docker build -f <Dockerfile> ...

Run image

docker run --rm -p 8080:8080 crystal-http:0.1
docker run -p <host:container>

Crystal is compiled, and can be statically linked. However, it is easier to just copy and link all libraries. Static linking only works for Alpine right now.

See: https://dev.to/franciscello/a-crystal-story-a-container-that-sails-1d37

See: https://gist.github.com/bcardiff/85ae47e66ff0df35a78697508fcb49af?permalink_comment_id=2261984

Repository

crystal_docker

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • 10 days ago
  • March 8, 2024
License

Links
Synced at

Fri, 22 Nov 2024 08:51:23 GMT

Languages