forked from vulhunt-re/vulhunt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (25 loc) · 988 Bytes
/
Dockerfile
File metadata and controls
41 lines (25 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM cgr.dev/chainguard/glibc-dynamic:latest-dev AS build
USER root
RUN apk update
RUN apk add rust cmake make build-base \
clang-20 llvm-20-dev git gmp-dev \
m4 bash curl xz zip
WORKDIR /build
COPY . .
RUN cargo install cargo-make && \
cargo make --profile=release prepare-bundle
RUN chown -R nonroot:nonroot target/bundle
FROM cgr.dev/chainguard/glibc-dynamic:latest AS runtime
LABEL org.opencontainers.image.source="https://github.com/vulhunt-re/vulhunt"
USER root
COPY --from=build /usr/lib/libz.so.1 /usr/lib/libz.so.1
RUN ["/sbin/ldconfig", "/usr/lib"]
USER nonroot
WORKDIR /opt/vulhunt
ENV PATH="/opt/vulhunt:${PATH}"
COPY --from=build /build/target/bundle/vulhunt-ce /opt/vulhunt
COPY --from=build /build/target/bundle/bias-lutil /opt/vulhunt
COPY --from=build /build/target/bundle/bias-tutil /opt/vulhunt
COPY --from=build /build/target/bundle/sleighc /opt/vulhunt
COPY --from=build /build/target/bundle/lib /opt/vulhunt/lib
ENTRYPOINT ["vulhunt-ce"]