-
-
Notifications
You must be signed in to change notification settings - Fork 426
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (18 loc) · 545 Bytes
/
Dockerfile
File metadata and controls
24 lines (18 loc) · 545 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:latest AS build-env
WORKDIR /src
ENV CGO_ENABLED=0
COPY go.mod go.sum /src/
RUN go mod download
COPY . .
ARG VERSION=dev
RUN go build -a -o brutespray -trimpath -ldflags "-s -w -X github.com/x90skysn3k/brutespray/v2/brutespray.version=${VERSION}"
FROM alpine:latest
RUN apk add --no-cache ca-certificates \
&& rm -rf /var/cache/*
RUN mkdir -p /app \
&& adduser -D brutespray \
&& chown -R brutespray:brutespray /app
USER brutespray
WORKDIR /app
COPY --from=build-env /src/brutespray .
ENTRYPOINT [ "./brutespray" ]