Skip to content

Commit

Permalink
add dockerfile for client
Browse files Browse the repository at this point in the history
  • Loading branch information
sukoneck committed Oct 7, 2024
1 parent feca0d1 commit b590893
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions proxy-client.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# syntax=docker/dockerfile:1
FROM golang:1.23 AS builder
ARG VERSION
WORKDIR /build
ADD go.mod /build/
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=linux \
go mod download
ADD . /build/
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=linux \
go build \
-trimpath \
-ldflags "-s -X github.com/flashbots/cvm-reverse-proxy/common.Version=${VERSION}" \
-v \
-o proxy-client \
cmd/proxy-client/main.go

FROM alpine:latest
WORKDIR /app
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/proxy-client /app/proxy-client
ENV LISTEN_ADDR=":8080"
EXPOSE 8080
CMD ["/app/proxy-client"]

0 comments on commit b590893

Please sign in to comment.