Compare commits

...

10 Commits

Author SHA1 Message Date
bmamihai b94b1bff86 Merge pull request 'docker' (#18) from docker into develop
Reviewed-on: #18
Reviewed-by: Cristi Ene <cristi.ene@safemobile.com>
2023-02-26 22:11:02 +00:00
bmamihai 5c4f2bf13e Merge branch 'develop' into docker 2023-02-26 22:10:34 +00:00
bmamihai 48eee903a5 added command for limiting cpu/memory 2023-01-05 14:31:51 +02:00
bmamihai d5bc0cd1d3 run under host network 2023-01-05 13:18:13 +02:00
bmamihai 1c353d7c88 Merge branch 'develop' into docker 2023-01-05 01:14:56 +02:00
bmamihai 3e31ba21bd replace individual copy with copy all 2022-12-15 13:20:22 +02:00
bmamihai cdf02756d3 fix start 2022-12-14 01:32:17 +02:00
bmamihai b2f9f5affa remove pm2 and watchify 2022-12-14 00:48:14 +02:00
bmamihai 5b9bfeaa01 improve docker 2022-12-10 03:21:59 +02:00
bmamihai e3bef9b3e5 New dockerfile 2022-12-10 02:38:09 +02:00
2 changed files with 22 additions and 6 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
doc

View File

@ -1,11 +1,25 @@
FROM ubuntu
FROM ubuntu:22.04
WORKDIR /app
RUN apt-get update && \
apt-get install -y build-essential pip net-tools iputils-ping iproute2 curl
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g watchify
EXPOSE 3000
EXPOSE 2000-2020
EXPOSE 10000-10100
COPY . /app/
RUN npm install
EXPOSE 3000/tcp
EXPOSE 2000-2200/udp
CMD node app.js
#docker build -t linx-video .
# docker run -it -d --restart always -p 3000:3000/tcp -p 2000-2200:2000-2200/udp linx-video
#Run under host network
# docker run -it -d --network host --restart always -p 3000:3000/tcp -p 2000-2200:2000-2200/udp linx-video
#https://docs.docker.com/config/containers/resource_constraints/
#docker run -it -d --network host --cpus="0.25" --memory="512m" --restart always -p 3000:3000/tcp -p 2000-2200:2000-2200/udp linx-video