File size: 668 Bytes
1852ea1
 
2e7e22f
 
 
 
 
 
 
 
 
 
 
 
 
 
5561fe7
 
 
1852ea1
af97354
 
738ffa6
1852ea1
5561fe7
1852ea1
738ffa6
1852ea1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:20

# Install native dependencies required by @napi-rs/canvas for image rendering
USER root
RUN apt-get update && apt-get install -y \
    libfontconfig1 \
    libfreetype6 \
    libpango1.0-0 \
    libcairo2 \
    libjpeg62-turbo \
    libpng16-16 \
    libgif7 \
    librsvg2-2 \
    fonts-dejavu-core \
    && rm -rf /var/lib/apt/lists/*

# The node image already has a user 'node' with UID 1000
USER node
WORKDIR /home/node/app

# Copy only package.json (NOT lock file) to force fresh platform-native install
COPY --chown=node package.json ./
RUN npm install

COPY --chown=node . .

ENV PORT=7860
CMD ["node", "--dns-result-order=ipv4first", "index.js"]