fixturenet-optimism-stack/container-build/cerc-optimism-op-proposer/Dockerfile
2024-09-06 19:58:08 +08:00

32 lines
709 B
Docker

FROM golang:1.21.0-alpine3.18 as builder
ARG VERSION=v0.0.0
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash
# build op-proposer with the shared go.mod & go.sum files
COPY ./op-proposer /app/op-proposer
COPY ./op-node /app/op-node
COPY ./op-service /app/op-service
COPY ./op-alt-da /app/op-alt-da
COPY ./packages /app/packages
COPY ./go.mod /app/go.mod
COPY ./go.sum /app/go.sum
COPY ./.git /app/.git
WORKDIR /app/op-proposer
RUN go mod download
ARG TARGETOS TARGETARCH
RUN make op-proposer VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH
FROM alpine:3.18
RUN apk add --no-cache jq bash
COPY --from=builder /app/op-proposer/bin/op-proposer /usr/local/bin
CMD ["op-proposer"]