-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (16 loc) · 669 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# stage: prefetch ------------------------------------------------------
FROM golang:1.22-alpine AS prefetch
RUN apk add --no-cache gcc musl-dev linux-headers
WORKDIR /go/src/github.com/flashbots/vpnham
COPY go.* ./
RUN go mod download
# stage: build ---------------------------------------------------------
FROM prefetch AS build
COPY . .
RUN go build -o bin/vpnham -ldflags "-s -w" github.com/flashbots/vpnham/cmd
# stage: run -----------------------------------------------------------
FROM alpine
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=build /go/src/github.com/flashbots/vpnham/bin/vpnham ./vpnham
ENTRYPOINT ["/app/vpnham"]