### STAGE 1: RUN ###
FROM node
RUN chmod 1777 /tmp
RUN mkdir /data
RUN apt-get update -y
RUN apt-get install -y libgdiplus
RUN apt-get install -y libreoffice
RUN apt-get install -y libfontconfig
RUN apt-get install -y phantomjs
ENV OPENSSL_CONF=/opt/openssl.cnf
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN cp -r ./swagger/supports/* ./node_modules
ENTRYPOINT ["node", "swagger.js"]