-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathDockerfile-dev
More file actions
30 lines (24 loc) · 986 Bytes
/
Dockerfile-dev
File metadata and controls
30 lines (24 loc) · 986 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
FROM node:20@sha256:c11ae157cdd9f8b522d5a65e7f3f5f5c34cf45a8bd883c15e8f2028a2673dec7
RUN apt update -y && apt upgrade -y && apt install -y curl wget zip unzip bash iputils-ping net-tools dnsutils
RUN npm install -g npm@10
ENV NODE_PATH=src \
PORT=1340 \
NODE_OPTIONS=--max_old_space_size=3072 \
CYPRESS_INSTALL_BINARY=0
WORKDIR /web
# install client dev dependencies for building app
COPY client/package*.json ./client/
RUN cd client && npm i
# install server dev dependencies
COPY server/package*.json ./server/
RUN cd server && npm i
# copy code to the client dir
COPY ./client /web/client/
# build VMT React client for production
# RUN cd ./server && npm run build-production
RUN cd ./client && node --max-old-space-size=3072 scripts/build.js production
# copy code to the server dir
COPY ./server /web/server/
EXPOSE 1340
CMD ["node", "/web/server/bin/www"]
#CMD ["tail", "-f", "/dev/null"] # uncomment this line to keep a crashing container up for troubleshooting