mirror of
https://github.com/OJ/gobuster.git
synced 2024-12-18 09:54:10 +01:00
24 lines
422 B
Docker
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" ]
|