Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Update Dockerfile to use Debian base images #520

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading