Fix architecture issues in Dockerfile

This commit is contained in:
LukeGus
2025-09-10 21:02:58 -05:00
parent 2b2848329c
commit 4568bc23c4

View File

@@ -6,6 +6,11 @@ RUN apk add --no-cache python3 make g++
COPY package*.json ./
# Set environment variables to force x64 architecture for problematic packages
ENV npm_config_target_platform=linux
ENV npm_config_target_arch=x64
ENV npm_config_target_libc=glibc
RUN npm ci --force && \
npm cache clean --force
@@ -31,6 +36,11 @@ WORKDIR /app
COPY package*.json ./
# Set environment variables to force x64 architecture for problematic packages
ENV npm_config_target_platform=linux
ENV npm_config_target_arch=x64
ENV npm_config_target_libc=glibc
RUN npm ci --only=production --ignore-scripts --force && \
npm cache clean --force
@@ -42,6 +52,11 @@ RUN apk add --no-cache python3 make g++
COPY package*.json ./
# Set environment variables to force x64 architecture for problematic packages
ENV npm_config_target_platform=linux
ENV npm_config_target_arch=x64
ENV npm_config_target_libc=glibc
RUN npm ci --only=production bcryptjs better-sqlite3 --force && \
npm cache clean --force