mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
23 lines
658 B
Docker
23 lines
658 B
Docker
|
# 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;"]
|