mediasoup/Dockerfile

28 lines
843 B
Docker
Raw Normal View History

2022-12-10 00:38:09 +00:00
FROM ubuntu:22.04
WORKDIR /app
2022-07-30 06:53:40 +00:00
RUN apt-get update && \
apt-get install -y build-essential pip net-tools iputils-ping iproute2 curl
2022-12-10 00:38:09 +00:00
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
2022-07-30 06:53:40 +00:00
RUN apt-get install -y nodejs
RUN npm install -g watchify
2022-12-10 00:38:09 +00:00
RUN npm install -g pm2
2022-12-10 01:21:59 +00:00
RUN mkdir -p server/ssl
RUN mkdir -p public/
COPY .env app.js package.json /app/
COPY server/ssl/* /app/server/ssl/
COPY public/* /app/public/
2022-12-10 00:38:09 +00:00
RUN npm install
2022-07-30 06:53:40 +00:00
2022-12-10 01:21:59 +00:00
EXPOSE 3000/tcp
EXPOSE 2000-2200/udp
CMD pm2 start app.js --name video-server -e /app/mediasoup-error.log -o /app/mediasoup-output.log -l /app/mediasoup.log --log-date-format "YYYY-MM-DD HH:mm:ss" --merge-logs --cwd /app/ -i 1; pm2 status; pm2 logs
2022-12-10 00:38:09 +00:00
2022-12-10 01:21:59 +00:00
#docker build -t linx-video .
# docker run -it -d --restart always -p 3000:3000/tcp -p 2000-2200:2000-2200/udp linx-video