Files
shields/Dockerfile
Vladimir Starkov a681fdaa87 Fix docker run (#1439)
* fix: update nodejs version to latest LTS, to fullfill check-node-version. close #1437

* docs: add docker run example without shields.env file, because there is no such file in a repo and container wont start

* fix: docker build project, clean npm and run production mode. close #1373
2018-01-15 15:19:28 -05:00

23 lines
496 B
Docker

FROM node:8.9.4-alpine
RUN apk add --no-cache gettext imagemagick librsvg ttf-dejavu git
ENV FALLBACK_FONT_PATH /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf
RUN mkdir -p /usr/src/app
RUN mkdir /usr/src/app/private
WORKDIR /usr/src/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
RUN npm run build
RUN npm prune --production
RUN npm cache clean --force
CMD envsubst < secret.tpl.json > ./private/secret.json
CMD node server
EXPOSE 80