-
-
Notifications
You must be signed in to change notification settings - Fork 338
/
Dockerfile
33 lines (26 loc) · 848 Bytes
/
Dockerfile
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
# Use a lightweight Node.js image
FROM node:20-slim
# Set working directory
WORKDIR /src
# Set environment variable to skip downloading prebuilt workers
ENV MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD="true"
# Install necessary system packages and dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
python3 \
python3-pip \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy package.json and install npm dependencies
COPY package.json .
RUN npm install
# Cleanup unnecessary packages and files
RUN apt-get purge -y --auto-remove build-essential python3-pip \
&& npm cache clean --force \
&& rm -rf /tmp/* /var/tmp/* /usr/share/doc/*
# Copy the application code
COPY app app
COPY public public
# Set default command to start the application
CMD ["npm", "start"]