forked from sunbird-cb/pdf-generator
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 1.47 KB
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
FROM node:14
WORKDIR /usr/src/app
# Dependencies for headless chrome - puppeteer
RUN echo "deb http://archive.debian.org/debian/ jessie main" > /etc/apt/sources.list
RUN echo "deb-src http://archive.debian.org/debian/ jessie main" >> /etc/apt/sources.list
RUN echo "deb http://archive.debian.org/debian-security/ jessie/updates main" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.debian.org/debian-security/ jessie/updates main" >> /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN apt install -y libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 --allow-unauthenticated
RUN apt-get update
RUN apt-get install -y wget gnupg && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update && apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends --allow-unauthenticated
RUN apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends --allow-unauthenticated --allow-unauthenticated
RUN apt-get install -y libdrm2 libgbm1 libnss3 --allow-unauthenticated
RUN mkdir -p /usr/src/app/user_upload
RUN mkdir -p /usr/src/app/logs
COPY package*.json ./
RUN npm install --only=production
COPY dist/ .
EXPOSE 3000
CMD [ "node", "app.js" ]