forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7591f19
commit e02310c
Showing
36 changed files
with
588 additions
and
396 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,9 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.21.1-alpine3.18 as builder | ||
|
||
ARG VERSION=v0.0.0 | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
COPY ./go.mod /app/go.mod | ||
COPY ./go.sum /app/go.sum | ||
|
||
WORKDIR /app | ||
|
||
RUN go mod download | ||
|
||
# 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 | ||
|
||
COPY ./.git /app/.git | ||
|
||
WORKDIR /app/op-batcher | ||
|
||
ARG TARGETOS TARGETARCH | ||
|
||
RUN make op-batcher VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
ARG OP_STACK_GO_BUILDER=us-docker.pkg.dev/oplabs-tools-artifacts/images/op_stack_go:latest | ||
FROM $OP_STACK_GO_BUILDER as builder | ||
# See "make golang-docker" and /ops/docker/op-stack-go | ||
|
||
FROM alpine:3.18 | ||
|
||
COPY --from=builder /app/op-batcher/bin/op-batcher /usr/local/bin | ||
COPY --from=builder /usr/local/bin/op-batcher /usr/local/bin/op-batcher | ||
|
||
ENTRYPOINT ["op-batcher"] | ||
CMD ["op-batcher"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ignore everything but the dockerfile, the op-stack-go base image performs the build | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,17 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.21.1-alpine3.18 as builder | ||
|
||
ARG VERSION=v0.0.0 | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
COPY ./go.mod /app/go.mod | ||
COPY ./go.sum /app/go.sum | ||
|
||
WORKDIR /app | ||
|
||
RUN go mod download | ||
|
||
# build op-challenger with the shared go.mod & go.sum files | ||
COPY ./op-challenger /app/op-challenger | ||
COPY ./op-program /app/op-program | ||
COPY ./op-preimage /app/op-preimage | ||
COPY ./op-bindings /app/op-bindings | ||
COPY ./op-node /app/op-node | ||
COPY ./op-service /app/op-service | ||
COPY ./.git /app/.git | ||
|
||
# Copy cannon and its dependencies | ||
COPY ./cannon /app/cannon | ||
COPY ./op-preimage /app/op-preimage | ||
COPY ./op-chain-ops /app/op-chain-ops | ||
|
||
WORKDIR /app/op-program | ||
|
||
ARG TARGETOS TARGETARCH | ||
|
||
RUN make op-program-host VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
|
||
WORKDIR /app/cannon | ||
|
||
ARG TARGETOS TARGETARCH | ||
|
||
RUN make cannon VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
|
||
WORKDIR /app/op-challenger | ||
|
||
RUN make op-challenger VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
ARG OP_STACK_GO_BUILDER=us-docker.pkg.dev/oplabs-tools-artifacts/images/op_stack_go:latest | ||
FROM $OP_STACK_GO_BUILDER as builder | ||
# See "make golang-docker" and /ops/docker/op-stack-go | ||
|
||
FROM alpine:3.18 | ||
|
||
# Make the bundled op-program the default cannon server | ||
COPY --from=builder /app/op-program/bin/op-program /usr/local/bin | ||
COPY --from=builder /usr/local/bin/op-program /usr/local/bin/op-program | ||
ENV OP_CHALLENGER_CANNON_SERVER /usr/local/bin/op-program | ||
|
||
# Make the bundled cannon the default cannon executable | ||
COPY --from=builder /app/cannon/bin/cannon /usr/local/bin | ||
COPY --from=builder /usr/local/bin/cannon /usr/local/bin/cannon | ||
ENV OP_CHALLENGER_CANNON_BIN /usr/local/bin/cannon | ||
|
||
COPY --from=builder /app/op-challenger/bin/op-challenger /usr/local/bin | ||
COPY --from=builder /usr/local/bin/op-challenger /usr/local/bin/op-challenger | ||
|
||
CMD ["op-challenger"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ignore everything but the dockerfile, the op-stack-go base image performs the build | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,9 @@ | ||
FROM golang:1.21.1-alpine3.18 as builder | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
# build op-heartbeat with local monorepo go modules | ||
COPY ./op-heartbeat /app/op-heartbeat | ||
COPY ./op-node /app/op-node | ||
COPY ./op-service /app/op-service | ||
COPY ./go.mod /app/go.mod | ||
COPY ./go.sum /app/go.sum | ||
|
||
COPY ./.git /app/.git | ||
|
||
WORKDIR /app/op-heartbeat | ||
|
||
RUN make op-heartbeat | ||
ARG OP_STACK_GO_BUILDER=us-docker.pkg.dev/oplabs-tools-artifacts/images/op_stack_go:latest | ||
FROM $OP_STACK_GO_BUILDER as builder | ||
# See "make golang-docker" and /ops/docker/op-stack-go | ||
|
||
FROM alpine:3.18 | ||
|
||
COPY --from=builder /app/op-heartbeat/bin/op-heartbeat /usr/local/bin | ||
COPY --from=builder /usr/local/bin/op-heartbeat /usr/local/bin/op-heartbeat | ||
|
||
CMD ["op-heartbeat"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ignore everything but the dockerfile, the op-stack-go base image performs the build | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,9 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.21.1-alpine3.18 as builder | ||
|
||
ARG VERSION=v0.0.0 | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
COPY ./go.mod /app/go.mod | ||
COPY ./go.sum /app/go.sum | ||
|
||
WORKDIR /app | ||
|
||
RUN go mod download | ||
|
||
# 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 | ||
COPY ./op-bindings /app/op-bindings | ||
COPY ./.git /app/.git | ||
|
||
WORKDIR /app/op-node | ||
|
||
ARG TARGETOS TARGETARCH | ||
|
||
RUN make op-node VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
ARG OP_STACK_GO_BUILDER=us-docker.pkg.dev/oplabs-tools-artifacts/images/op_stack_go:latest | ||
FROM $OP_STACK_GO_BUILDER as builder | ||
# See "make golang-docker" and /ops/docker/op-stack-go | ||
|
||
FROM alpine:3.18 | ||
|
||
COPY --from=builder /app/op-node/bin/op-node /usr/local/bin | ||
COPY --from=builder /usr/local/bin/op-node /usr/local/bin/op-node | ||
|
||
CMD ["op-node"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ignore everything but the dockerfile, the op-stack-go base image performs the build | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.