2020-09-16 14:17:58 +00:00
|
|
|
FROM golang:alpine as builder
|
2020-05-19 07:48:57 +00:00
|
|
|
|
2020-09-16 14:17:58 +00:00
|
|
|
RUN mkdir -p /app
|
|
|
|
WORKDIR /app
|
2020-09-23 21:15:46 +00:00
|
|
|
COPY ./v2/go.mod .
|
2020-09-16 14:17:58 +00:00
|
|
|
RUN go mod download
|
2020-05-19 07:48:57 +00:00
|
|
|
|
2020-09-16 14:17:58 +00:00
|
|
|
COPY . .
|
2020-09-23 20:38:59 +00:00
|
|
|
RUN cd ./v2/cmd/nuclei && go build -o nuclei .
|
2020-05-19 07:48:57 +00:00
|
|
|
|
2020-09-16 14:17:58 +00:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
RUN mkdir /app
|
2020-10-05 14:53:16 +00:00
|
|
|
RUN adduser --home /app --shell /bin/sh --disabled-password appuser
|
2020-09-23 20:38:59 +00:00
|
|
|
COPY --from=builder /app/v2/cmd/nuclei/nuclei /app
|
2020-09-29 10:52:03 +00:00
|
|
|
USER appuser
|
2020-09-16 14:17:58 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
2020-09-29 10:52:03 +00:00
|
|
|
ENTRYPOINT ["/app/nuclei"]
|