-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 684 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (26 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Use the official Node.js slim image as the base image
FROM node:22-slim
# Set the working directory
WORKDIR /app
# Install necessary dependencies and build tools
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
make \
g++ \
gcc \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# Install dependencies
COPY package*.json ./
RUN npm install
COPY . .
# RUN npm run build
# Copy the rest of the application code
# Expose port 3000 for development
EXPOSE 3000
# Set environment variables for development
ENV NODE_ENV development
# RUN sudo setenforce 0
# Start the development server for development
CMD ["npm","run","dev"]