Skip to content

Commit 1001152

Browse files
committed
no-edit
1 parent d767aee commit 1001152

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pull official base image
2-
FROM node:alpine
2+
FROM node:12
33

44
# set working directory
55
WORKDIR /app
@@ -11,10 +11,14 @@ ENV PATH /app/node_modules/.bin:$PATH
1111
COPY package.json ./
1212
COPY package-lock.json ./
1313
RUN npm install --silent
14-
# RUN npm start --silent
1514

1615
# add app
17-
COPY . ./
16+
COPY . .
17+
18+
#Expose the app
19+
EXPOSE 3000
20+
#Build
21+
RUN npm run build:prod
1822

1923
# start app
2024
CMD ["npm", "start"]

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,5 @@ This application requires the following dependencies in order to function proper
2929
### Docker
3030

3131
- 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/`.

0 commit comments

Comments
 (0)