diff --git a/Dockerfile.client b/Dockerfile.client index 838e26ad..bd9395c9 100644 --- a/Dockerfile.client +++ b/Dockerfile.client @@ -12,7 +12,8 @@ COPY solana /usr/src/solana WORKDIR /usr/src/solana/pyth2wormhole RUN --mount=type=cache,target=/root/.cache \ - --mount=type=cache,target=target \ + --mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \ + --mount=type=cache,target=/usr/src/solana/pyth2wormhole/target,id=p2w_cargo_build \ cargo install --version =2.0.12 --locked spl-token-cli --target-dir target @@ -23,8 +24,8 @@ ENV EMITTER_ADDRESS="11111111111111111111111111111115" ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o" RUN --mount=type=cache,target=/root/.cache \ - --mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \ - --mount=type=cache,target=target,id=cargo_registry \ + --mount=type=cache,target=/usr/local/cargo/registry \ + --mount=type=cache,target=/usr/src/solana/pyth2wormhole/target \ set -xe && \ cargo install bridge_client --git https://github.com/wormhole-foundation/wormhole --tag $WORMHOLE_TAG --locked --root /usr/local --target-dir target && \ cargo install token_bridge_client --git https://github.com/wormhole-foundation/wormhole --tag $WORMHOLE_TAG --locked --root /usr/local --target-dir target diff --git a/Dockerfile.solana b/Dockerfile.solana index 5448d4e1..a4237096 100644 --- a/Dockerfile.solana +++ b/Dockerfile.solana @@ -46,8 +46,10 @@ ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o" WORKDIR /usr/src/bridge/solana # Build Wormhole Solana programs -RUN --mount=type=cache,target=../wormhole/solana/target \ - --mount=type=cache,target=pyth2wormhole/target \ +RUN --mount=type=cache,target=/usr/src/bridge/wormhole/solana/target \ + --mount=type=cache,target=/usr/src/bridge/solana/pyth2wormhole/target \ + --mount=type=cache,target=/usr/local/cargo/registry \ + --mount=type=cache,target=/root/.cache \ cargo build-bpf --manifest-path "../wormhole/solana/bridge/program/Cargo.toml" -- --locked && \ cargo build-bpf --manifest-path "../wormhole/solana/bridge/cpi_poster/Cargo.toml" -- --locked && \ cargo build-bpf --manifest-path "pyth2wormhole/program/Cargo.toml" -- --locked && \