Files
shields/Dockerfile
Christophe Bliard cafb66bd93 Add fallback font and missing libs for .png generation
If Verdana.ttf can't be loaded, the font file pointed by the
FALLBACK_FONT_PATH environment variable will be loaded.

This fixes width computation errors that can occur with non-latin
characters when running with Docker.
2017-09-22 13:27:59 -04:00

20 lines
454 B
Docker

FROM node:6.9.2-alpine
RUN apk add --no-cache gettext imagemagick librsvg ttf-dejavu
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 && \
rm -rf /tmp/npm-* /root/.npm
COPY . /usr/src/app
CMD envsubst < secret.tpl.json > ./private/secret.json && npm start
EXPOSE 80