2024-05-07 04:18:02 +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-node with the shared go.mod & go.sum files
|
|
|
|
COPY ./op-node /app/op-node
|
|
|
|
COPY ./op-chain-ops /app/op-chain-ops
|
|
|
|
COPY ./op-service /app/op-service
|
2024-08-18 20:32:03 +00:00
|
|
|
COPY ./op-alt-da /app/op-alt-da
|
2024-05-07 04:18:02 +00:00
|
|
|
COPY ./op-conductor /app/op-conductor
|
2024-08-18 20:32:03 +00:00
|
|
|
COPY ./packages /app/packages
|
2024-05-07 04:18:02 +00:00
|
|
|
COPY ./go.mod /app/go.mod
|
|
|
|
COPY ./go.sum /app/go.sum
|
|
|
|
COPY ./.git /app/.git
|
|
|
|
|
|
|
|
WORKDIR /app/op-node
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
ARG TARGETOS TARGETARCH
|
|
|
|
|
|
|
|
RUN make op-node VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH
|
|
|
|
|
|
|
|
FROM alpine:3.18
|
|
|
|
|
|
|
|
RUN apk add --no-cache openssl jq bash curl
|
|
|
|
|
|
|
|
COPY --from=builder /app/op-node/bin/op-node /usr/local/bin
|
|
|
|
|
|
|
|
CMD ["op-node"]
|