Skip to content

Commit

Permalink
Merge pull request #520 from owasp-noir/issue-511-2
Browse files Browse the repository at this point in the history
refactor: Update Dockerfile to use Debian base images
  • Loading branch information
hahwul authored Jan 26, 2025
2 parents a46f732 + 8177c6a commit 9046d8d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
##= BUILDER =##
FROM crystallang/crystal:latest-alpine As builder
FROM 84codes/crystal:latest-debian-12 As builder

WORKDIR /noir
COPY . .

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

##= RUNNER =##
FROM alpine:latest
FROM debian:12-slim
LABEL org.opencontainers.image.title="OWASP Noir"
LABEL org.opencontainers.image.version="0.19.0"
LABEL org.opencontainers.image.description="OWASP Noir is an open-source project specializing in identifying attack surfaces for enhanced whitebox security testing and security pipeline."
Expand All @@ -18,9 +20,9 @@ LABEL org.opencontainers.image.source=https://github.com/owasp-noir/noir
LABEL org.opencontainers.image.documentation="https://owasp-noir.github.io/noir/"
LABEL org.opencontainers.image.licenses=MIT

USER 2:2

COPY --from=builder /noir/bin/noir /usr/local/bin/noir
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/
#COPY --from=builder /etc/ssl/cert.pem /etc/ssl/

USER 2:2

CMD ["noir"]
CMD ["noir"]

0 comments on commit 9046d8d

Please sign in to comment.