-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Dockerfile to use Node.js 14 runtime and install depend…
…encies
- Loading branch information
1 parent
443af81
commit b6939a8
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 an official Node.js runtime as the base image | ||
FROM node:14 | ||
|
||
# Set the working directory in the container to /app | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json into the working directory | ||
COPY package*.json ./ | ||
|
||
# Install any needed packages specified in package.json | ||
RUN npm install | ||
|
||
# Bundle the app source inside the Docker image | ||
COPY . . | ||
|
||
# Make port 3000 available to the world outside the Docker container | ||
EXPOSE 3000 | ||
|
||
# Define the command to run the app | ||
CMD [ "node", "index.js" ] |