Dockerfile.base 878 B

1234567891011121314151617
  1. #syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
  2. FROM docker.io/library/rust:1.60.0@sha256:9fe1f39bec70576e2bd568fafb194b2a532a6f2928bc0b951ac2c0a69a2be9fe as solana
  3. RUN sh -c "$(curl -sSfL https://release.solana.com/v1.10.31/install)"
  4. ENV PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
  5. COPY rust-toolchain .
  6. # Solana does a questionable download at the beginning of a *first* build-bpf call. Trigger and layer-cache it explicitly.
  7. RUN cargo init --lib /tmp/decoy-crate && \
  8. cd /tmp/decoy-crate && cargo build-bpf && \
  9. rm -rf /tmp/decoy-crate
  10. # The strip shell script downloads criterion the first time it runs so cache it here as well.
  11. RUN touch /tmp/foo.so && \
  12. /root/.local/share/solana/install/active_release/bin/sdk/bpf/scripts/strip.sh /tmp/foo.so /tmp/bar.so || \
  13. rm /tmp/foo.so