forked from project-sunbird/print-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (24 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM circleci/node:8.11.2-stretch as build
MAINTAINER "Mahesh Kumar Gangula" "[email protected]"
USER root
COPY src /opt/print-service/
WORKDIR /opt/print-service/
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN npm install --unsafe-perm
FROM node:8.11-slim
MAINTAINER "Mahesh Kumar Gangula" "[email protected]"
RUN apt-get clean \
&& 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' \
&& apt update && apt install fonts-indic -y \
&& apt-get install -y google-chrome-unstable \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -r sunbird && useradd -r -g sunbird -G audio,video sunbird \
&& mkdir -p /home/sunbird/Downloads \
&& chown -R sunbird:sunbird /home/sunbird
RUN fc-cache -f -v
USER sunbird
COPY --from=build --chown=sunbird /opt/print-service/ /home/sunbird/print-service/
WORKDIR /home/sunbird/print-service/
CMD ["node", "app.js", "&"]