20 lines
471 B
Docker
20 lines
471 B
Docker
# Use an official Node runtime as the parent image
|
|
FROM node:18
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy package.json and package-lock.json
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of your app's source code
|
|
COPY . .
|
|
|
|
# Your app binds to port 3000 so you'll use the EXPOSE instruction to have it mapped by the docker daemon
|
|
EXPOSE 3000
|
|
|
|
# Define the command to run your app
|
|
CMD [ "node", "index.js" ] |