Skip to content

Commit

Permalink
fix: Update Dockerfile to enable static linking during build
Browse files Browse the repository at this point in the history
Signed-off-by: HAHWUL <[email protected]>
  • Loading branch information
hahwul committed Jan 24, 2025
1 parent 08dbff5 commit 0b8079d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# BUILDER
##= BUILDER =##
FROM crystallang/crystal:latest-alpine As builder

WORKDIR /noir
COPY . .

RUN shards install --production && \
shards build --release --no-debug --production
shards build --release --no-debug --production --static
# Ref: https://crystal-lang.org/reference/1.15/guides/static_linking.html

# RUNNER
##= RUNNER =##
FROM alpine:latest
LABEL org.opencontainers.image.title="OWASP Noir"
LABEL org.opencontainers.image.version="0.19.0"
Expand Down

0 comments on commit 0b8079d

Please sign in to comment.