Add optimism go code containers

This commit is contained in:
David Boreham 2023-03-26 11:13:34 -06:00 committed by prathamesh0
parent 1ea0a7459d
commit 3472347f5c
6 changed files with 73 additions and 2 deletions

View File

@ -0,0 +1,30 @@
FROM golang:1.19.0-alpine3.15 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
COPY ./op-signer /app/op-signer
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.15
COPY --from=builder /app/op-batcher/bin/op-batcher /usr/local/bin
ENTRYPOINT ["op-batcher"]

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build cerc/optimism-op-batcher
# TODO: use upstream Dockerfile once its buildx-specific content has been removed
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/optimism-op-batcher:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/optimism

View File

@ -0,0 +1,28 @@
FROM golang:1.19.0-alpine3.15 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
COPY ./op-bindings /app/op-bindings
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.15
COPY --from=builder /app/op-node/bin/op-node /usr/local/bin
CMD ["op-node"]

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build cerc/optimism-op-node
# TODO: use upstream Dockerfile once its buildx-specific content has been removed
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/optimism-op-node:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/optimism

View File

@ -31,4 +31,5 @@ cerc/builder-gerbil
cerc/act-runner
cerc/act-runner-task-executor
cerc/optimism-l2geth
cerc/optimism-batcher
cerc/optimism-op-batcher
cerc/optimism-op-node

View File

@ -13,7 +13,9 @@ containers:
- cerc/fixturenet-eth-geth
- cerc/fixturenet-eth-lighthouse
- cerc/optimism-l2geth
- cerc/optimism-batcher
- cerc/optimism-op-batcher
- cerc/optimism-op-node
- cerc/optimism-contracts
- cerc/foundry
pods:
- fixturenet-eth