File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ jobs:
1010 runs-on : ubuntu-22.04 # LTS
1111 steps :
1212 - name : Checkout
13- uses : actions/checkout@v3
13+ uses : actions/checkout@v4
1414
1515 - name : Set up Node.js
16- uses : actions/setup-node@v3
16+ uses : actions/setup-node@v4
1717 with :
1818 node-version : ' 22.x' # LTS
1919
@@ -28,22 +28,24 @@ jobs:
2828 needs : test # This ensures the build job only runs if the test job succeeds
2929 steps :
3030 - name : Checkout
31- uses : actions/checkout@v3
31+ uses : actions/checkout@v4
3232
3333 - name : Set up QEMU
34- uses : docker/setup-qemu-action@v2
34+ uses : docker/setup-qemu-action@v3
35+ with :
36+ platforms : arm64
3537
3638 - name : Set up Docker Buildx
37- uses : docker/setup-buildx-action@v2
39+ uses : docker/setup-buildx-action@v3
3840
3941 - name : Login Docker Hub
40- uses : docker/login-action@v2
42+ uses : docker/login-action@v3
4143 with :
4244 username : ${{ secrets.DOCKERHUB_USERNAME }}
4345 password : ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
4446
4547 - name : Build and publish
46- uses : docker/build-push-action@v3
48+ uses : docker/build-push-action@v6
4749 with :
4850 context : ./
4951 file : ./Dockerfile
Original file line number Diff line number Diff line change 1- # Use a lightweight Node.js image
2- FROM node:22-alpine
1+ # Use Debian slim for more reliable multi-arch builds under emulation
2+ FROM node:22-bookworm-slim
33
44# Set working directory
55WORKDIR /src
@@ -12,12 +12,13 @@ COPY package*.json ./
1212COPY .env.template ./.env
1313
1414# Install necessary system packages and dependencies
15- RUN apk add --no-cache \
15+ RUN apt-get update \
16+ && apt-get install -y --no-install-recommends \
1617 bash \
1718 vim \
18- && npm ci --only=production --silent \
19+ && npm ci --omit=dev --silent \
1920 && npm cache clean --force \
20- && rm -rf /tmp/* /var/tmp/* /usr/share/doc/*
21+ && rm -rf /var/lib/apt/lists/* / tmp/* /var/tmp/* /usr/share/doc/*
2122
2223# Copy the application code
2324COPY frontend frontend
You can’t perform that action at this time.
0 commit comments