Skip to content

Commit 2f2f912

Browse files
committed
fix: update Dockerfile and deployment workflow for amd64 compatibility
- Changed the Docker build platform in `deploy-web.yml` from linux/arm64 to linux/amd64 for consistent deployment. - Specified the platform as linux/amd64 in all stages of `Dockerfile.lambda` to ensure compatibility with GitHub Actions runners and AWS Lambda.
1 parent 8cac8d4 commit 2f2f912

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/deploy-web.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
IMAGE_TAG: ${{ github.sha }}
3838
run: |
3939
cd web
40-
docker buildx build --provenance=false --platform linux/arm64 \
40+
docker buildx build --provenance=false --platform linux/amd64 \
4141
-t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
4242
-t $ECR_REGISTRY/$ECR_REPOSITORY:latest \
4343
-f Dockerfile.lambda \

web/Dockerfile.lambda

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Uses AWS Lambda Web Adapter to proxy Lambda invoke → HTTP on :3000
33
# Non-AWS base images work because the adapter bundles the Runtime Interface Client.
44

5-
# Stage 1: install deps + build React SPA
6-
FROM oven/bun:1-alpine AS builder
5+
# Stage 1: install deps + build React SPA (explicit amd64 for GitHub Actions runner / Lambda)
6+
FROM --platform=linux/amd64 oven/bun:1-alpine AS builder
77
WORKDIR /app
88
COPY package.json bun.lock* ./
99
RUN bun install --frozen-lockfile
@@ -17,13 +17,13 @@ ENV VITE_GOOGLE_CLIENT_ID=$VITE_GOOGLE_CLIENT_ID
1717
RUN bun run build
1818

1919
# Stage 2: production deps only
20-
FROM oven/bun:1-alpine AS deps
20+
FROM --platform=linux/amd64 oven/bun:1-alpine AS deps
2121
WORKDIR /app
2222
COPY package.json bun.lock* ./
2323
RUN bun install --frozen-lockfile --production
2424

2525
# Stage 3: Lambda runtime with web adapter
26-
FROM oven/bun:1-debian
26+
FROM --platform=linux/amd64 oven/bun:1-debian
2727
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
2828

2929
# Install Lambda Web Adapter (includes Runtime Interface Client for non-AWS base images)

0 commit comments

Comments
 (0)