From 2a46ae84b2a0eecb97771cb4da358690abe8b2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=B6se?= Date: Fri, 12 Jul 2024 23:44:19 +0200 Subject: [PATCH 1/2] Fix Node Version pinning the new lts of node is 20 now, so the docker build fails with incompatible node modules, because the build version is 18.x.x and the run version is 20.x.x Using the node version pinning also for the "runtime-version" fixes this issue. The other modifications are just to get rid of some docker build warnings. --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f1035873..06dae061 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 -ARG NODE_VERSION=18 +arg NODE_VERSION=18 -FROM node:${NODE_VERSION} AS build +from node:${NODE_VERSION} as build workdir /app run apt-get update > /dev/null && apt-get -y install python3-pip > /dev/null run mkdir certs && openssl req -x509 -newkey rsa:2048 -sha256 -days 36500 -nodes -keyout certs/privkey.pem -out certs/fullchain.pem -subj '/CN=dialog' @@ -9,9 +9,9 @@ copy package.json . copy package-lock.json . run npm ci copy . . -from node:lts-slim +from node:${NODE_VERSION}-slim workdir /app copy --from=build /app /app run apt-get update > /dev/null && apt-get install -y jq curl dnsutils netcat > /dev/null copy scripts/docker/run.sh /run.sh -cmd bash /run.sh +cmd ["bash", "/run.sh"] From b2bfdf13c38fef442bea759332299990c626fdff Mon Sep 17 00:00:00 2001 From: "P. Douglas Reeder" Date: Fri, 23 Jan 2026 13:37:13 -0500 Subject: [PATCH 2/2] Updates with changes made in hubs-cloud/community-edition/services/dialog/ Why: 1. To consolidate development. 2. netcat was already in the base image 3. The `healthcheck` function was hacky and was less useful than fetching `http://dialog:7000/meta` --- Dockerfile | 2 +- scripts/docker/run.sh | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06dae061..5541ae4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,6 @@ copy . . from node:${NODE_VERSION}-slim workdir /app copy --from=build /app /app -run apt-get update > /dev/null && apt-get install -y jq curl dnsutils netcat > /dev/null +run apt-get update > /dev/null && apt-get install -y jq curl dnsutils > /dev/null copy scripts/docker/run.sh /run.sh cmd ["bash", "/run.sh"] diff --git a/scripts/docker/run.sh b/scripts/docker/run.sh index b3455eb0..5b493fc5 100644 --- a/scripts/docker/run.sh +++ b/scripts/docker/run.sh @@ -1,17 +1,11 @@ # TODO: need a better one PUB_IP_CURL=https://ipinfo.io/ip -healthcheck(){ - while true; do (echo -e 'HTTP/1.1 200 OK\r\n\r\n 1') | nc -lp 1111 > /dev/null; done -} - - -healthcheck & -echo -e $(echo -e ${perms_key//\n/n}) > /app/certs/perms.pub.pem +echo -e $(echo -e ${perms_key//\n/n}) > /app/certs/perms.pub.pem head -3 /app/certs/perms.pub.pem export MEDIASOUP_ANNOUNCED_IP=$(curl ${PUB_IP_CURL}) echo "MEDIASOUP_ANNOUNCED_IP: $MEDIASOUP_ANNOUNCED_IP" export INTERACTIVE=nope # npm start -DEBUG='*INFO* *WARN* *ERROR*' node index.js \ No newline at end of file +DEBUG='*INFO* *WARN* *ERROR*' node index.js