Files
EMI-Backend/Dockerfile
Adolfo Reyna 3319e9fa36 Add Dockerfile
2024-10-04 16:35:59 -04:00

26 lines
630 B
Docker

# Use an official Node.js runtime as a parent image
FROM node:18-alpine
# Install Python, make, and g++ to allow native module compilation
RUN apk add --no-cache python3 make g++
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application source code
COPY . .
# Expose the port your Express app runs on
EXPOSE 3001
# Command to run your app
CMD ["npm", "start"]
# sudo docker build -t emi-backend .
# sudo docker run -d -p 4000:5000 -e PORT=5000 emi-backend