-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 781 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 781 Bytes
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
31
32
33
FROM node:14.15.5-alpine3.13 AS explorer
WORKDIR /explorer
COPY ./package.json .
COPY ./package-lock.json .
# install frontend dependencies before copying the frontend code
# into the container so we get docker cache benefits
RUN npm install
# running ngcc before build_prod lets us utilize the docker
# cache and significantly speeds up builds without requiring us
# to import/export the node_modules folder from the container
RUN npm run ngcc
COPY ./angular.json .
COPY ./tsconfig.json .
COPY ./tsconfig.app.json .
COPY ./tslint.json .
COPY ./src ./src
RUN npm run build_prod
# build minified version of frontend, served using caddy
FROM caddy:2.3.0-alpine
WORKDIR /explorer
COPY ./Caddyfile .
COPY --from=explorer /explorer/dist/explorer .
ENTRYPOINT ["caddy", "run"]