mirror of
https://github.com/bee-san/RustScan.git
synced 2026-11-09 17:03:29 -10:00
At the moment the Dockerfile brings the entire current directory in as a context for the building container. We can encourage some caching here by only bringing forward the essentials: `cargo.tml`, `cargo.lock` and the `src` + Added a maintainer label
19 lines
680 B
Docker
19 lines
680 B
Docker
FROM rust:alpine as builder
|
|
LABEL maintainer="CMNatic <https://github.com/CMNatic">
|
|
RUN apk add --no-cache build-base
|
|
|
|
# Encourage some layer caching here rather then copying entire directory that includes docs to builder container ~CMN
|
|
WORKDIR /usr/src/rustscan
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src src
|
|
RUN cargo install --path .
|
|
|
|
FROM alpine:3.12
|
|
LABEL author="Hydragyrum <https://github.com/Hydragyrum>"
|
|
RUN addgroup -S rustscan && \
|
|
adduser -S -G rustscan rustscan && \
|
|
ulimit -n 100000 && \
|
|
apk add --no-cache nmap nmap-scripts wget
|
|
COPY --from=builder /usr/local/cargo/bin/rustscan /usr/local/bin/rustscan
|
|
USER rustscan
|
|
ENTRYPOINT [ "/usr/local/bin/rustscan" ] |