1
1
mirror of https://github.com/OJ/gobuster.git synced 2024-12-18 09:54:10 +01:00
gobuster/Dockerfile
Christian Mehlmauer d5cc39ea7e
Dev (#395)
2023-02-20 09:27:53 +01: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" ]