error-pages/Dockerfile

23 lines
658 B
Docker
Raw Normal View History

2020-07-08 11:12:21 +00:00
# Image page: <https://hub.docker.com/_/node>
FROM node:12.16.2-alpine as builder
WORKDIR /src
COPY . .
RUN set -x \
&& yarn install --frozen-lockfile \
&& ./bin/generator.js -c ./configuration.json -o ./out
# Image page: <https://hub.docker.com/_/nginx>
FROM nginx:1.18-alpine
COPY --from=builder --chown=nginx /src/docker/docker-entrypoint.sh /docker-entrypoint.sh
COPY --from=builder --chown=nginx /src/docker/nginx-server.conf /etc/nginx/conf.d/default.conf
COPY --from=builder --chown=nginx /src/static /opt/html
COPY --from=builder --chown=nginx /src/out /opt/html
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]