-
Notifications
You must be signed in to change notification settings - Fork 115
/
Dockerfile_dev
44 lines (36 loc) · 1.08 KB
/
Dockerfile_dev
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
#
# Docker file for ChRIS ui development server
#
# Build with
#
# docker build -t <name>:<tag> -f <dockerfile> .
#
# For example if building a local version, you could do:
#
# docker build -t local/chris_ui:dev -f Dockerfile_dev .
#
# 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} --build-arg UID=$UID -t local/chris_ui:dev -f Dockerfile_dev .
#
# To run the server up during development, do:
#
# docker run --rm -it -v $(pwd):/home/localuser -p 3000:3000 -u $(id -u):$(id -g) --name chris_ui local/chris_ui:dev
#
# To run an interactive shell inside this container, do:
#
# docker exec -it chris_ui sh
#
FROM node:20.17 as builder
MAINTAINER fnndsc "[email protected]"
# Pass a UID on build command line (see above) to set internal UID
ARG UID=1001
ENV UID=$UID HOME="/home/localuser" VERSION="0.1"
RUN adduser --uid $UID --disabled-password localuser \
&& npm install chrome -g
# Start as user localuser
USER localuser
WORKDIR $HOME
EXPOSE 3000
CMD npm install && npm run dev