Created
March 16, 2020 17:53
-
-
Save pgeraghty/feccf5ff86b54b7512735943dc7af4a9 to your computer and use it in GitHub Desktop.
Basic Dockerfile for multi-stage build of statically-linked binary via Crystal shards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM crystallang/crystal:0.33.0-alpine-build as builder | |
WORKDIR /app | |
COPY . /app | |
RUN shards build --static --release --no-debug | |
FROM scratch | |
WORKDIR /app | |
COPY --from=builder /app/bin /bin | |
ENTRYPOINT ["/bin/<YOUR_BINARY_NAME"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment