Skip to content

Commit 0ef41ae

Browse files
committed
Improve ARM64 build support with retry logic and timeout;
1 parent d5b4951 commit 0ef41ae

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ jobs:
139139
cache-from: type=gha
140140
cache-to: type=gha,mode=max
141141
platforms: linux/amd64,linux/arm64
142+
provenance: false
143+
sbom: false
144+
timeout-minutes: 60
142145

143146
- name: Run Trivy vulnerability scanner
144147
uses: aquasecurity/trivy-action@master

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ FROM python:3.12-alpine AS backend-builder
2323

2424
WORKDIR /app/backend
2525

26-
# Install build dependencies
27-
RUN apk add --no-cache gcc musl-dev libffi-dev
26+
# Install build dependencies with retry logic for ARM64 compatibility
27+
RUN apk update && \
28+
apk add --no-cache gcc musl-dev libffi-dev || \
29+
(sleep 2 && apk update && apk add --no-cache gcc musl-dev libffi-dev)
2830

2931
# Copy requirements
3032
COPY backend/requirements.txt ./
@@ -41,7 +43,10 @@ LABEL version="1.0.0"
4143
LABEL description="IP-HOP DDNS Management Application"
4244

4345
# Install runtime dependencies only
44-
RUN apk add --no-cache nodejs npm curl
46+
# Update APK repositories and install with retry logic for ARM64 compatibility
47+
RUN apk update && \
48+
apk add --no-cache nodejs npm curl || \
49+
(sleep 2 && apk update && apk add --no-cache nodejs npm curl)
4550

4651
# Create non-root user
4752
RUN addgroup -g 1000 iphop && \

0 commit comments

Comments
 (0)