Skip to content

Commit

Permalink
Revert using network host for debug container spawner
Browse files Browse the repository at this point in the history
  • Loading branch information
shapovalovts committed Oct 19, 2024
1 parent f6ee109 commit c9af0d3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions scripts/start-debug-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ IMAGE_NAME=swm-build:24.2
DOCKER_SOCKET=/var/run/docker.sock
X11_SOCKET=/tmp/.X11-unix
CONTAINER_NAME=skyport-dev
DOMAIN=openworkload.org

case "$(uname -s)" in
Linux*) ;;
Darwin*) USER=root;;
esac
JUPUTER_HUB_API_PORT=8081
JUPUTER_HUB_PORT=8000

RUNNING=$(${DOCKER} inspect -f '{{.State.Running}}' ${CONTAINER_NAME})
if [ "$?" = "1" ]; then
Expand All @@ -53,12 +52,17 @@ if [ "$?" = "1" ]; then
-v ${X11_SOCKET}:${X11_SOCKET}\
-e DISPLAY=${DISPLAY}\
--name ${CONTAINER_NAME}\
--hostname ${CONTAINER_NAME}.openworkload.org\
--domainname openworkload.org\
--hostname $(hostname)\
--domainname $DOMAIN\
--workdir ${PWD}\
--tty\
--interactive\
--net host\
--network bridge\
-p 10000:10000\
-p 10011:10011\
-p 8443:8443\
-p $JUPUTER_HUB_PORT:$JUPUTER_HUB_PORT\
-p $JUPUTER_HUB_API_PORT:$JUPUTER_HUB_API_PORT\
${IMAGE_NAME}\
runuser -u ${USER} /bin/bash

Expand Down

0 comments on commit c9af0d3

Please sign in to comment.