Spaces:
Sleeping
Sleeping
File size: 1,259 Bytes
49412e8 | 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | FROM node:18-slim
# Install Ghostscript, LibreOffice, and Puppeteer dependencies
RUN apt-get update && apt-get install -y \
ghostscript \
libreoffice \
libreoffice-calc \
libreoffice-writer \
libreoffice-impress \
wget \
gnupg \
ca-certificates \
fonts-liberation \
fonts-noto \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgbm1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
fonts-indic \
fonts-noto-core \
fonts-noto-extra \
fonts-noto-ui-core \
ttf-dejavu \
ttf-ubuntu-font-family \
ttf-freefont \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Set HOME so LibreOffice can write its user profile
ENV HOME=/tmp
WORKDIR /usr/src/app
COPY package*.json ./
# Install dependencies, skip Chromium download (puppeteer will use bundled)
RUN npm install --omit=dev
COPY . .
EXPOSE 5000
CMD ["node", "server.js"]
|