【发布时间】:2023-01-13 21:05:12
【问题描述】:
我有一个 dockerized nodejs 应用程序。我使用 libreoffice 转换为 PDF。
如何使用 nodejs 应用程序将 libreoffice 添加到 dockerfile?我怎样才能让应用程序能够使用 libreoffice 应用程序?
FROM node:16.8.0-alpine
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*
RUN npm install
# If you are building your code for production
#RUN npm ci --only=production
# Bundle app source
COPY . .
RUN npm run build
EXPOSE 80:80
CMD [ "node", "build/index.js","STAGING"]
【问题讨论】:
标签: node.js docker dockerfile libreoffice