Skip to content

Commit

Permalink
docs: add comments in dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: amitamrutiya2210 <[email protected]>
  • Loading branch information
amitamrutiya committed Feb 21, 2024
1 parent 468dbd6 commit ec95104
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions backend/Dockerfile
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"]

0 comments on commit ec95104

Please sign in to comment.