2024-04-26 09:26:39 +00:00
|
|
|
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-batcher with the shared go.mod & go.sum files
|
|
|
|
COPY ./op-batcher /app/op-batcher
|
|
|
|
COPY ./op-bindings /app/op-bindings
|
|
|
|
COPY ./op-node /app/op-node
|
|
|
|
COPY ./op-service /app/op-service
|
2024-04-29 11:32:35 +00:00
|
|
|
COPY ./op-plasma /app/op-plasma
|
2024-04-26 09:26:39 +00:00
|
|
|
COPY ./go.mod /app/go.mod
|
|
|
|
COPY ./go.sum /app/go.sum
|
|
|
|
|
|
|
|
COPY ./.git /app/.git
|
|
|
|
|
|
|
|
WORKDIR /app/op-batcher
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
ARG TARGETOS TARGETARCH
|
|
|
|
|
|
|
|
RUN make op-batcher VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH
|
|
|
|
|
|
|
|
FROM alpine:3.18
|
|
|
|
|
|
|
|
RUN apk add --no-cache jq bash
|
|
|
|
|
|
|
|
COPY --from=builder /app/op-batcher/bin/op-batcher /usr/local/bin
|
|
|
|
|
|
|
|
ENTRYPOINT ["op-batcher"]
|