如何将libreoffice添加到Dockerfile

lb3vh1jj  于 2023-01-16  发布在  Docker
关注(0)|答案(1)|浏览(341)

我有一个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"]

相关问题