-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: amitamrutiya2210 <[email protected]>
- Loading branch information
1 parent
468dbd6
commit ec95104
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
# Use the official Node.js 21 image from Docker Hub as the base image | ||
FROM node:21 | ||
|
||
# Set the working directory in the Docker container to /app | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json (if available) to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install the dependencies defined in package.json | ||
RUN npm install | ||
|
||
# Copy the rest of the application code to the working directory | ||
COPY . . | ||
|
||
# Expose port 4000 in the Docker container. This is the port that the application will use. | ||
EXPOSE 4000 | ||
|
||
# Define the command that should be executed when the Docker container starts. | ||
# In this case, "npm run start" will be executed. | ||
CMD ["npm", "run", "start"] |