Skip to content

Commit 96e5d71

Browse files
committed
Update Dockerfile to use Debian-based Node.js image and install dependencies with apt-get for improved compatibility
1 parent f6b02ff commit 96e5d71

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

server/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
# Use Node.js LTS version
2-
FROM node:20-alpine
1+
# Use Node.js LTS version (Debian-based)
2+
FROM node:20
33

4-
# Install required dependencies for sharp
5-
RUN apk add --no-cache python3 make g++ vips-dev
4+
# Install required dependencies using apt-get
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
python3 \
7+
make \
8+
g++ \
9+
libvips-dev \
10+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
611

712
# Create app directory
813
WORKDIR /app
914

1015
# Copy package files
1116
COPY package*.json ./
1217

13-
# Remove any existing sharp installation
14-
RUN npm uninstall sharp
15-
16-
# Install dependencies and rebuild sharp for Alpine
17-
RUN npm install --platform=linux --arch=x64 --libc=musl
18-
RUN npm rebuild sharp
18+
# Install dependencies (standard install)
19+
RUN npm install
1920

2021
# Bundle app source
2122
COPY . .

0 commit comments

Comments
 (0)