mirror of
https://github.com/donavon04/DocuCenter.git
synced 2025-01-18 09:40:56 -07:00
22 lines
472 B
Docker
22 lines
472 B
Docker
|
# Use the official Node.js 14 image as the base image
|
||
|
FROM node:21.4-alpine
|
||
|
|
||
|
# Set the working directory inside the container
|
||
|
WORKDIR /app
|
||
|
|
||
|
# Copy package.json and package-lock.json to the working directory
|
||
|
COPY package*.json ./
|
||
|
|
||
|
# Install project dependencies
|
||
|
RUN npm install
|
||
|
|
||
|
# Copy the project files to the working directory
|
||
|
COPY . ./
|
||
|
|
||
|
# Expose port 3000 for the Node.js application
|
||
|
EXPOSE 3000
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
# Start the Node.js application
|
||
|
CMD [ "node", "server.js" ]
|