gobuster-lib/Dockerfile
2024-09-04 23:15:35 +03:00

24 lines
422 B
Docker

FROM golang:latest AS build-env
WORKDIR /src
ENV CGO_ENABLED=0
COPY go.mod /src/
RUN go mod download
COPY . .
RUN go build -a -o gobuster -trimpath
FROM alpine:latest
RUN apk add --no-cache ca-certificates \
&& rm -rf /var/cache/*
RUN mkdir -p /app \
&& adduser -D gobuster \
&& chown -R gobuster:gobuster /app
USER gobuster
WORKDIR /app
COPY --from=build-env /src/gobuster .
ENTRYPOINT [ "./gobuster" ]