LineUp-Bot / Dockerfile
Brozy123's picture
Update Dockerfile
af97354 verified
Raw History Blame
668 Bytes
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"]