-
Notifications
You must be signed in to change notification settings - Fork 115
/
Dockerfile
51 lines (40 loc) · 992 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ChRIS_ui production mode server
#
# Build with
#
# docker build -t <name> .
#
# For example if building a local version, you could do:
#
# docker build -t local/chris_ui .
#
# In the case of a proxy (located at say 10.41.13.4:3128), do:
#
# export PROXY="http://10.41.13.4:3128"
# docker build --build-arg http_proxy=${PROXY} -t local/chris_ui .
#
# To run the server up, do:
#
# docker run --name chris_ui -p 3000:3000 -d local/chris_ui
#
# To run an interactive shell inside this container, do:
#
# docker exec -it chris_ui sh
#
# Tips:
# - for access logging, remove "--quiet" from CMD
# - docker-entrypoint.sh must start as root
FROM node:20.17 as builder
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
FROM node:20.17-alpine
RUN npm i -g sirv-cli
WORKDIR /app
COPY --from=builder /app/dist /app
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
ENV HOST=0.0.0.0 PORT=3000
CMD ["sirv", "--etag", "--single"]
EXPOSE 3000