Skip to content

Commit c5cb230

Browse files
authored
feat: Update Dockerfile
1 parent 64595ef commit c5cb230

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Dockerfile

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1-
FROM alpine:3.17.2
2-
CMD ["echo", "Hello World!"]
1+
# Use Node.js 14 LTS version as base image
2+
FROM node:14
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json to the working directory
8+
COPY package*.json ./
9+
10+
# Install dependencies
11+
RUN npm install
12+
13+
# Copy all files from the current directory to the working directory in the container
14+
COPY . .
15+
16+
# Expose the port the app runs on
17+
EXPOSE 3000
18+
19+
# Command to run the application
20+
CMD ["node", "index.js"]

0 commit comments

Comments
 (0)