-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64595ef
commit c5cb230
Showing
1 changed file
with
20 additions
and
2 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,2 +1,20 @@ | ||
FROM alpine:3.17.2 | ||
CMD ["echo", "Hello World!"] | ||
# Use Node.js 14 LTS version as base image | ||
FROM node:14 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy all files from the current directory to the working directory in the container | ||
COPY . . | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|
||
# Command to run the application | ||
CMD ["node", "index.js"] |