docker update

dev
bauthard 2020-09-16 19:47:58 +05:30 committed by GitHub
parent 497136463b
commit 9f10341627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 7 deletions

View File

@ -1,10 +1,19 @@
FROM golang:1.14-alpine AS build-env
FROM golang:alpine as builder
RUN apk add --no-cache --upgrade git openssh-client ca-certificates
RUN go get -u github.com/golang/dep/cmd/dep
WORKDIR /go/src/app
RUN mkdir -p /app
WORKDIR /app
COPY ./go.mod .
RUN go mod download
# Install
RUN GO111MODULE=on go get -u github.com/projectdiscovery/nuclei/v2/cmd/nuclei
COPY . .
RUN cd ./cmd/nuclei && go build -o nuclei .
ENTRYPOINT ["nuclei"]
FROM alpine
RUN mkdir /app
RUN adduser -S -D -H -h /app appuser
USER appuser
COPY --from=builder /app/cmd/nuclei/nuclei /app
WORKDIR /app
CMD ["./nuclei"]