File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # pull official base image
2+ FROM node:14-alpine
3+
4+ # set working directory
5+ WORKDIR /app
6+
7+ # add `/app/node_modules/.bin` to $PATH
8+ ENV PATH /app/node_modules/.bin:$PATH
9+
10+ # install app dependencies
11+ COPY package.json ./
12+ RUN npm install --silent
13+ RUN npm install react-scripts@4.0.0 -g --silent
14+
15+ # add app
16+ COPY . ./
17+
18+ # Expose port
19+ EXPOSE 3000
20+
21+ # start app
22+ CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change 1+ version : ' 3.7'
2+
3+ services :
4+
5+ sample :
6+ container_name : react-soft-ui
7+ build :
8+ context : .
9+ dockerfile : Dockerfile
10+ volumes :
11+ - ' .:/app'
12+ - ' /app/node_modules'
13+ ports :
14+ - 3000:3000
15+ environment :
16+ - CHOKIDAR_USEPOLLING=true
17+
You can’t perform that action at this time.
0 commit comments