From 1c3e45e858c586e6bfb9bb09639580ac8455f334 Mon Sep 17 00:00:00 2001 From: Vladimir Protsenko Date: Sat, 6 Jan 2024 03:09:25 +0400 Subject: [PATCH] Added second default port for web app that could be inside the docker (gradio, nginx, apache, ...) --- vscode.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vscode.sh b/vscode.sh index 1b4f8ea..0f37e96 100755 --- a/vscode.sh +++ b/vscode.sh @@ -1,13 +1,15 @@ #!/bin/bash CURDIRNAME=${PWD##*/} -PORT=8400 +VSCODE_PORT=8400 +YOURAPP_INSIDE_DOCKER_PORT=24000 PASSWORD=$(openssl rand -base64 45) docker run \ -d \ --rm \ --gpus "device=0" \ - -p $PORT:8443 \ + -p ${VSCODE_PORT}:8443 \ + -p ${YOURAPP_INSIDE_DOCKER_PORT}:443 \ -v $(pwd):/wd \ --shm-size=10gb \ --name ${USER}_${CURDIRNAME}_vscode \ @@ -18,4 +20,4 @@ sleep 1 docker logs ${USER}_${CURDIRNAME}_vscode echo "" echo "Address: https://$(hostname -i | awk '{ print $1; }'):${PORT}" -echo "Password: $PASSWORD" +echo "Password: $PASSWORD" \ No newline at end of file