Skip to content

Commit

Permalink
Merge pull request #2275 from OffchainLabs/backward-compat-docker
Browse files Browse the repository at this point in the history
Backward compat docker
  • Loading branch information
joshuacolvin0 authored May 13, 2024
2 parents 9ba5f46 + d032762 commit 17ae104
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 137 deletions.
22 changes: 14 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ COPY --from=contracts-builder workspace/contracts/node_modules/@offchainlabs/upg
COPY --from=contracts-builder workspace/.make/ .make/
RUN PATH="$PATH:/usr/local/go/bin" NITRO_BUILD_IGNORE_TIMESTAMPS=1 make build-wasm-bin

FROM rust:1.75-slim-bullseye as prover-header-builder
FROM rust:1.75-slim-bookworm as prover-header-builder
WORKDIR /workspace
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
Expand All @@ -115,15 +115,15 @@ RUN NITRO_BUILD_IGNORE_TIMESTAMPS=1 make build-prover-header
FROM scratch as prover-header-export
COPY --from=prover-header-builder /workspace/target/ /

FROM rust:1.75-slim-bullseye as prover-builder
FROM rust:1.75-slim-bookworm as prover-builder
WORKDIR /workspace
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y make wget gpg software-properties-common zlib1g-dev libstdc++-10-dev wabt
apt-get install -y make wget gpg software-properties-common zlib1g-dev libstdc++-12-dev wabt
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
add-apt-repository 'deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main' && \
add-apt-repository 'deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-15 main' && \
apt-get update && \
apt-get install -y llvm-15-dev libclang-common-15-dev libpolly-15-dev
apt-get install -y llvm-15-dev libclang-common-15-dev
COPY --from=brotli-library-export / target/
COPY arbitrator/Cargo.* arbitrator/
COPY arbitrator/arbutil arbitrator/arbutil
Expand Down Expand Up @@ -204,7 +204,7 @@ COPY ./scripts/download-machine.sh .
#RUN ./download-machine.sh consensus-v11.1 0x68e4fe5023f792d4ef584796c84d710303a5e12ea02d6e37e2b5e9c4332507c4
#RUN ./download-machine.sh consensus-v20 0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4

FROM golang:1.21-bullseye as node-builder
FROM golang:1.21-bookworm as node-builder
WORKDIR /workspace
ARG version=""
ARG datetime=""
Expand Down Expand Up @@ -285,7 +285,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \

USER user

FROM nitro-node as nitro-node-dev
FROM nitro-node as nitro-node-dev-base
USER root
# Copy in latest WASM module root
RUN rm -f /home/user/target/machines/latest
Expand All @@ -309,13 +309,19 @@ RUN export DEBIAN_FRONTEND=noninteractive && \

USER user

FROM nitro-node-dev as nitro-node-split
FROM offchainlabs/nitro-node:v2.3.4-rc.5-b4cc111 as nitro-legacy

FROM nitro-node-dev-base as nitro-node-dev
USER root

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y xxd netcat-traditional
COPY scripts/split-val-entry.sh /usr/local/bin
COPY --from=nitro-legacy /home/user/target/machines /home/user/nitro-legacy/machines
RUN rm -rf /workspace/target/legacy-machines/latest
COPY --from=nitro-legacy /usr/local/bin/nitro-val /home/user/nitro-legacy/bin/nitro-val
COPY --from=nitro-legacy /usr/local/bin/jit /home/user/nitro-legacy/bin/jit
ENTRYPOINT [ "/usr/local/bin/split-val-entry.sh" ]
USER user

Expand Down
Loading

0 comments on commit 17ae104

Please sign in to comment.