[mirotalksfu] - update dockerfile

هذا الالتزام موجود في:
Miroslav Pejic
2024-05-11 01:29:20 +02:00
الأصل 69ced47ffa
التزام db25883c4b
2 ملفات معدلة مع 22 إضافات و12 حذوفات

عرض الملف

@@ -1,22 +1,32 @@
FROM node:18-slim # Use a lightweight Node.js image
FROM node:20-slim
# Set working directory
WORKDIR /src WORKDIR /src
# https://mediasoup.org/documentation/v3/mediasoup/installation/ # Set environment variable to skip downloading prebuilt workers
ENV MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD="true" 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 \
&& rm -rf /var/lib/apt/lists/*
# Copy package.json and install npm dependencies
COPY package.json . COPY package.json .
RUN npm install
RUN \ # Cleanup unnecessary packages and files
DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN apt-get purge -y --auto-remove build-essential python3-pip \
apt-get install -y --no-install-recommends build-essential python3-pip && \ && npm cache clean --force \
npm install && \ && rm -rf /tmp/* /var/tmp/* /usr/share/doc/*
apt-get -y purge --auto-remove build-essential python3-pip && \
apt-get install -y --no-install-recommends python3 && \
npm cache clean --force && \
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* /usr/share/doc/*
# Copy the application code
COPY app app COPY app app
COPY public public COPY public public
CMD npm start # Set default command to start the application
CMD ["npm", "start"]