Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit 65b3205

Browse files
authored
Simplified Dockerfile
As per the docker documentation at https://docs.docker.com/engine/reference/builder/#workdir, "If the WORKDIR doesn’t exist, it will be created even if it’s not used in any subsequent Dockerfile instruction". Once the WORKDIR is set, . can be used to refer to it.
1 parent bdec291 commit 65b3205

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM node:latest
2-
RUN mkdir -p /usr/src/app
32
WORKDIR /usr/src/app
4-
COPY package.json /usr/src/app/
3+
COPY package.json .
54
RUN npm install
6-
COPY . /usr/src/app
5+
COPY . .
76
EXPOSE 3000
8-
CMD [ "npm", "start" ]
7+
CMD [ "npm", "start" ]

0 commit comments

Comments
 (0)