File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
# pull official base image
2
- FROM node:alpine
2
+ FROM node:12
3
3
4
4
# set working directory
5
5
WORKDIR /app
@@ -11,10 +11,14 @@ ENV PATH /app/node_modules/.bin:$PATH
11
11
COPY package.json ./
12
12
COPY package-lock.json ./
13
13
RUN npm install --silent
14
- # RUN npm start --silent
15
14
16
15
# add app
17
- COPY . ./
16
+ COPY . .
17
+
18
+ # Expose the app
19
+ EXPOSE 3000
20
+ # Build
21
+ RUN npm run build:prod
18
22
19
23
# start app
20
24
CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change @@ -29,8 +29,5 @@ This application requires the following dependencies in order to function proper
29
29
### Docker
30
30
31
31
- Run ` docker build . -t barefootnamdimage ` To create an image
32
- - Run ` docker run barefootnamdimage ` to run the image
33
- - In a new terminal:
34
- - Run ` docker ps ` to view all available containers
35
- - Run ` docker exec -it CONTAINER ID ` , the * CONTAINER ID* being that of * ` barefootnamdimage ` *
36
- - Now you can run all the app commands
32
+ - Run ` docker run -it -p 3000:3000 barefootnomadimage ` to run the image
33
+ - In the browser go to ` http://localhost:3000/ ` .
You can’t perform that action at this time.
0 commit comments