fix: copy Dockerfiles from rivet with rust:1.88.0 base

This commit is contained in:
Nathan Flurry 2026-01-27 18:05:36 -08:00
parent ef56a5231c
commit 41813f6572
4 changed files with 88 additions and 29 deletions

View file

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.10.0
FROM rust:1.91.0 AS base
FROM rust:1.88.0 AS base
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get install -y \
clang \
cmake \
@ -21,8 +21,10 @@ RUN git config --global --add safe.directory '*' && \
mv MacOSX11.3.sdk.tar.xz tarballs/ && \
UNATTENDED=yes OSX_VERSION_MIN=10.7 ./build.sh
# Add osxcross to PATH
ENV PATH="/root/osxcross/target/bin:$PATH"
# Tell Clang/bindgen to use the macOS SDK, and nudge Clang to prefer osxcross binutils.
ENV OSXCROSS_SDK=MacOSX11.3.sdk \
SDKROOT=/root/osxcross/target/SDK/MacOSX11.3.sdk \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_apple_darwin="--sysroot=/root/osxcross/target/SDK/MacOSX11.3.sdk -isystem /root/osxcross/target/SDK/MacOSX11.3.sdk/usr/include" \
@ -37,12 +39,16 @@ ENV OSXCROSS_SDK=MacOSX11.3.sdk \
CARGO_INCREMENTAL=0 \
CARGO_NET_GIT_FETCH_WITH_CLI=true
# Set working directory
WORKDIR /build
# Build for ARM64 macOS
FROM base AS aarch64-builder
# Install macOS ARM64 target
RUN rustup target add aarch64-apple-darwin
# Configure Cargo for cross-compilation (ARM64)
RUN mkdir -p /root/.cargo && \
echo '\
[target.aarch64-apple-darwin]\n\
@ -50,8 +56,10 @@ linker = "aarch64-apple-darwin20.4-clang"\n\
ar = "aarch64-apple-darwin20.4-ar"\n\
' > /root/.cargo/config.toml
# Copy the source code
COPY . .
# Build for ARM64 macOS
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/build/target \
@ -59,4 +67,5 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
mkdir -p /artifacts && \
cp target/aarch64-apple-darwin/release/sandbox-agent /artifacts/sandbox-agent-aarch64-apple-darwin
# Default command to show help
CMD ["ls", "-la", "/artifacts"]