Skip to content

Commit b590893

Browse files
committed
add dockerfile for client
1 parent feca0d1 commit b590893

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

proxy-client.dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1
2+
FROM golang:1.23 AS builder
3+
ARG VERSION
4+
WORKDIR /build
5+
ADD go.mod /build/
6+
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=linux \
7+
go mod download
8+
ADD . /build/
9+
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=linux \
10+
go build \
11+
-trimpath \
12+
-ldflags "-s -X github.com/flashbots/cvm-reverse-proxy/common.Version=${VERSION}" \
13+
-v \
14+
-o proxy-client \
15+
cmd/proxy-client/main.go
16+
17+
FROM alpine:latest
18+
WORKDIR /app
19+
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
20+
COPY --from=builder /build/proxy-client /app/proxy-client
21+
ENV LISTEN_ADDR=":8080"
22+
EXPOSE 8080
23+
CMD ["/app/proxy-client"]

0 commit comments

Comments
 (0)