mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 09:02:12 +00:00
fix: explicitly set TARGETARCH for Docker multi-arch builds
This commit is contained in:
parent
d7f32f3ee5
commit
6b15432c71
2 changed files with 5 additions and 4 deletions
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
|
|
@ -195,6 +195,8 @@ jobs:
|
||||||
tags: rivetdev/sandbox-agent:${{ steps.vars.outputs.sha_short }}${{ matrix.arch_suffix }}
|
tags: rivetdev/sandbox-agent:${{ steps.vars.outputs.sha_short }}${{ matrix.arch_suffix }}
|
||||||
file: docker/runtime/Dockerfile
|
file: docker/runtime/Dockerfile
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
|
build-args: |
|
||||||
|
TARGETARCH=${{ contains(matrix.platform, 'arm64') && 'arm64' || 'amd64' }}
|
||||||
|
|
||||||
complete:
|
complete:
|
||||||
name: "Complete"
|
name: "Complete"
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
# syntax=docker/dockerfile:1.10.0
|
# syntax=docker/dockerfile:1.10.0
|
||||||
|
|
||||||
ARG TARGETARCH
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# AMD64 Builder - Uses cross-tools musl toolchain
|
# AMD64 Builder - Uses cross-tools musl toolchain
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
FROM rust:1.88.0 AS builder-amd64
|
FROM --platform=linux/amd64 rust:1.88.0 AS builder-amd64
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
|
@ -70,7 +68,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# ARM64 Builder - Uses Alpine with native musl
|
# ARM64 Builder - Uses Alpine with native musl
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
FROM rust:1.88-alpine AS builder-arm64
|
FROM --platform=linux/arm64 rust:1.88-alpine AS builder-arm64
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
musl-dev \
|
musl-dev \
|
||||||
|
|
@ -101,6 +99,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Select the appropriate builder based on target architecture
|
# Select the appropriate builder based on target architecture
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
ARG TARGETARCH
|
||||||
FROM builder-${TARGETARCH} AS builder
|
FROM builder-${TARGETARCH} AS builder
|
||||||
|
|
||||||
# Runtime stage - minimal image
|
# Runtime stage - minimal image
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue