Skip to content

Commit

Permalink
feat(ci): Migrate to vendored image as a zksync-runtime-base (#2926)
Browse files Browse the repository at this point in the history
## What ❔

Move building images to zksync-runtime-base

## Why ❔

Workaround for dockerhub rate limits

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
artmakh authored Sep 19, 2024
1 parent 1b06409 commit 174dcf5
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 21 deletions.
4 changes: 2 additions & 2 deletions docker/contract-verifier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ COPY . .

RUN cargo build --release

FROM debian:bookworm-slim
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

RUN apt-get update && apt-get install -y curl libpq5 ca-certificates wget python3 jq && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y wget python3 jq && rm -rf /var/lib/apt/lists/*

# install zksolc 1.3.x
RUN skip_versions="v1.3.12 v1.3.15 v1.3.20" && \
Expand Down
4 changes: 1 addition & 3 deletions docker/external-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ WORKDIR /usr/src/zksync
COPY . .
RUN cargo build --release

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

COPY --from=builder /usr/src/zksync/target/release/zksync_external_node /usr/bin
COPY --from=builder /usr/src/zksync/target/release/block_reverter /usr/bin
Expand Down
3 changes: 1 addition & 2 deletions docker/prover-fri-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ COPY . .

RUN cd prover && cargo build --release --bin zksync_prover_fri_gateway

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

# copy VK required for proof wrapping
COPY prover/data/keys/ /prover/data/keys/
Expand Down
3 changes: 1 addition & 2 deletions docker/prover-job-monitor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ COPY . .

RUN cd prover && cargo build --release --bin zksync_prover_job_monitor

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

COPY --from=builder /usr/src/zksync/prover/target/release/zksync_prover_job_monitor /usr/bin/

Expand Down
4 changes: 2 additions & 2 deletions docker/server-v2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ COPY . .

RUN cargo build --release --features=rocksdb/io-uring

FROM debian:bookworm-slim
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

RUN apt-get update && apt-get install -y curl libpq5 liburing-dev ca-certificates && \
RUN apt-get update && apt-get install -y liburing-dev && \
rm -rf /var/lib/apt/lists/*

EXPOSE 3000
Expand Down
4 changes: 2 additions & 2 deletions docker/snapshots-creator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ COPY . .

RUN cargo build --release --bin snapshots_creator

FROM debian:bookworm-slim
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

RUN apt-get update && apt-get install -y curl libpq5 liburing-dev ca-certificates && \
RUN apt-get update && apt-get install -y liburing-dev && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/src/zksync/target/release/snapshots_creator /usr/bin
Expand Down
5 changes: 3 additions & 2 deletions docker/verified-sources-fetcher/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ COPY . .

RUN cargo build --release --bin verified_sources_fetcher

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates gnupg curl git && rm -rf /var/lib/apt/lists/*
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

RUN apt-get update && apt-get install -y apt-transport-https gnupg git && rm -rf /var/lib/apt/lists/*

RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
Expand Down
4 changes: 1 addition & 3 deletions docker/witness-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ COPY . .

RUN cd prover && cargo build --release --bin zksync_witness_generator

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

COPY prover/data/keys/ /prover/data/keys/

Expand Down
4 changes: 1 addition & 3 deletions docker/witness-vector-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ COPY . .

RUN cd prover && cargo build --release --bin zksync_witness_vector_generator

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y curl libpq5 ca-certificates && rm -rf /var/lib/apt/lists/*
FROM ghcr.io/matter-labs/zksync-runtime-base:latest

# copy finalization hints required for witness vector generation
COPY prover/data/keys/ /prover/data/keys/
Expand Down

0 comments on commit 174dcf5

Please sign in to comment.