Skip to content

Commit 146a840

Browse files
authored
Dockerfile
Enhanced with comments
1 parent 8572bae commit 146a840

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
# Use Node.js version 14 as the base image
12
FROM node:14
23

4+
# Set the working directory inside the container
35
WORKDIR /app
46

7+
# Copy package.json and package-lock.json (if present) to the working directory
58
COPY package*.json ./
69

10+
# Install npm dependencies
711
RUN npm install
812

13+
# Copy all files from the current directory to the working directory in the container
914
COPY . .
1015

16+
# Expose port 80 to allow communication to/from the container
1117
EXPOSE 80
1218

19+
# Specify the command to run the application
1320
CMD ["npm", "start"]

0 commit comments

Comments
 (0)