File size: 1,141 Bytes
b03975e 631bc06 40c18b8 e4a9905 c1ee635 7a9cfc3 40c18b8 7a9cfc3 d54c054 44078d6 8bc4f21 40c18b8 b03975e 8bc4f21 0790117 b03975e 40c18b8 b03975e 40c18b8 9f54dc5 40c18b8 |
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 |
FROM node:18
# 创建工作目录
WORKDIR /app
COPY . .
# 赋予权限/归递
RUN chmod -R 777 /tmp
RUN chmod -R 777 /app
RUN apt-get update
#RUN apt-get install -y libnss3 libgconf-2-4 libgdk-pixbuf2.0-0 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 libxss1 libxtst6 libnss3 libasound2 libatk-bridge2.0-0 libgtk-3-0
#RUN apt-get install -y libdrm2 libnss3 libgconf-2-4 libgdk-pixbuf2.0-0 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 libxss1 libxtst6 libnss3 libasound2 libatk-bridge2.0-0 libgtk-3-0
# 安装项目依赖
RUN npm install
RUN apt-get update && apt-get install -yq --no-install-recommends \
libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libdbus-1-3 libexpat1 \
libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 \
libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 libxss1 ca-certificates fonts-liberation libnss3 lsb-release \
fonts-ipafont-gothic fonts-wqy-zenhei fonts-freefont-ttf
# 暴露应用运行的端口
EXPOSE 7860
# 启动应用
CMD ["node", "."]
|