You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
458 B
21 lines
458 B
FROM node:18.17.1-alpine3.17
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy package.json and package-lock.json into the container
|
|
COPY package*.json ./
|
|
|
|
# Install app dependencies inside the container
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
# Copy the application code into the container
|
|
COPY . .
|
|
|
|
# Expose port 3000 to interact with the application
|
|
EXPOSE 3000
|
|
|
|
# Define the command to run the application
|
|
CMD [ "npm", "start" ]
|
|
|