-
Notifications
You must be signed in to change notification settings - Fork 77
/
Dockerfile
30 lines (21 loc) · 667 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# BUILD IMAGE
FROM node:10 as build
WORKDIR /app
# Invalidate cache
ADD "http://worldtimeapi.org/api/timezone/Europe/Amsterdam.txt" skipCache
# Add app
COPY website /app
RUN yarn
# Remove potentially cached Docusaurus files
RUN rm -rf /app/.docusaurus
RUN rm -rf /app/build
# Generate build
RUN yarn build
# ###############################################################################
# PROD IMAGE
FROM nginx:1.17.0-alpine
# Invalidate cache
ADD "http://worldtimeapi.org/api/timezone/Europe/Amsterdam.txt" skipCache
# Copy build artifacts from the 'build environment'
RUN rm -rf /usr/share/nginx/html/**
COPY --from=build /app/build /usr/share/nginx/html