FROM golang:1.24 AS op
RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \
git switch -c branch-$OP_NODE_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]'
RUN . /tmp/versions.env && cd op-node && \
make VERSION=$OP_NODE_TAG op-node
FROM golang:1.24 AS geth
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN . /tmp/versions.env && git clone $OP_GETH_REPO --branch $OP_GETH_TAG --single-branch . && \
git switch -c branch-$OP_GETH_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$OP_GETH_COMMIT" ]'
RUN go run build/ci.go install -static ./cmd/geth
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y jq curl supervisor && \
rm -rf /var/lib/apt/lists
RUN mkdir -p /var/log/supervisor
WORKDIR /app
COPY --from=op /app/op-node/bin/op-node ./
COPY --from=geth /app/build/bin/geth ./
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY geth/geth-entrypoint ./execution-entrypoint
COPY op-node-entrypoint .
CMD ["/usr/bin/supervisord"]
FROM golang:1.24 AS op
RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \
git switch -c branch-$OP_NODE_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]'
RUN . /tmp/versions.env && cd op-node && \
make VERSION=$OP_NODE_TAG op-node
FROM golang:1.24 AS geth
WORKDIR /app
COPY versions.env /tmp/versions.env
RUN . /tmp/versions.env && git clone $OP_GETH_REPO --branch $OP_GETH_TAG --single-branch . && \
git switch -c branch-$OP_GETH_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$OP_GETH_COMMIT" ]'
RUN go run build/ci.go install -static ./cmd/geth
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y jq curl supervisor && \
rm -rf /var/lib/apt/lists
RUN mkdir -p /var/log/supervisor
WORKDIR /app
COPY --from=op /app/op-node/bin/op-node ./op-node
COPY --from=geth /app/build/bin/geth ./geth
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY geth/geth-entrypoint ./execution-entrypoint
COPY op-node-entrypoint .
CMD ["/usr/bin/supervisord"]
node_modules .git
Concerns: Final image uses ubuntu:24.04; ensure this tag exists in the registry and is the intended, stable base for production (tags can vary by registry and time)., The build pins commits via OP_NODE_COMMIT and OP_GETH_COMMIT checks after cloning specific branches/tags; if those commits drift or tags are updated, the build could fail even if the code builds successfully., entrypoint scripts (geth-entrypoint and op-node-entrypoint) are copied from the build context (root of the repo). If those files are missing or their paths change, the docker build will fail. Consider copying from a stage or validating their presence in the repo layout. Smoke [PASS]: test -x /app/op-node && test -x /app/geth Smoke [PASS]: /app/geth version | head -n 1 Smoke [PASS]: ls -l /app | grep -E 'op-node|geth' | head -n 1