Skip to content

Commit 6466e90

Browse files
committed
Fix multi-platform Docker build failures in CI
Remove BuildKit cache mounts from pixi-installer stage to resolve QEMU emulation issues when building ARM64 images on AMD64 runners. The cache mounts cause apt-get operations to fail with exit code 100 in emulated environments. Also remove unused BASE_IMAGE build argument from CI workflow since the hardened Dockerfile now uses digest-pinned base images. Changes: - Remove --mount=type=cache flags from pixi-installer stage - Remove BASE_IMAGE and GPU_BASE_IMAGE env vars from workflow - Remove build-args: BASE_IMAGE from build step
1 parent 926e054 commit 6466e90

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/build-push-docker.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ on:
2727

2828
env:
2929
DOCKER_ORG: nebari
30-
GPU_BASE_IMAGE: nvidia/cuda:12.2.2-base-ubuntu20.04
3130
GPU_IMAGE_SUFFIX: gpu
32-
BASE_IMAGE: ubuntu:20.04
3331

3432
permissions:
3533
contents: read
@@ -85,11 +83,10 @@ jobs:
8583
username: ${{ secrets.QUAY_USERNAME }}
8684
password: ${{ secrets.QUAY_TOKEN }}
8785

88-
- name: "Set BASE_IMAGE and Image Suffix 📷"
86+
- name: "Set Image Suffix 📷"
8987
if: ${{ matrix.platform == 'gpu' }}
9088
run: |
9189
echo "GPU Platform Matrix"
92-
echo "BASE_IMAGE=$GPU_BASE_IMAGE" >> $GITHUB_ENV
9390
echo "IMAGE_SUFFIX=-$GPU_IMAGE_SUFFIX" >> $GITHUB_ENV
9491
9592
- name: "Generate Docker images tags 🏷️"
@@ -123,7 +120,6 @@ jobs:
123120
labels: ${{ steps.meta.outputs.labels }}
124121
cache-from: type=gha
125122
cache-to: type=gha,mode=max
126-
build-args: BASE_IMAGE=${{ env.BASE_IMAGE }}
127123
platforms: linux/amd64,linux/arm64
128124
sbom: true
129125
provenance: true

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ ARG PIXI_VERSION
2222
ARG PIXI_AMD64_SHA256
2323
ARG PIXI_ARM64_SHA256
2424

25-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
26-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
27-
apt-get update && apt-get install -y --no-install-recommends \
25+
RUN apt-get update && apt-get install -y --no-install-recommends \
2826
wget \
2927
ca-certificates && \
3028
ARCH=$(dpkg --print-architecture) && \

0 commit comments

Comments
 (0)