Add dockerfile
Initial upload
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
|||||||
|
# Use the official Node.js image from the Docker Hub
|
||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
# Set the working directory inside the container
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the package.json and package-lock.json to install dependencies
|
||||||
|
COPY package.json .
|
||||||
|
COPY package-lock.json .
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the rest of the app files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Expose the port the app runs on
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Command to run the app
|
||||||
|
CMD ["node", "server.js"]
|
||||||
Reference in New Issue
Block a user