diff --git a/README.md b/README.md index 526b9d3..e8ff1ac 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ services: environment: - DISPLAY # For GUI access - XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server - - XDG_OPEN_LISTENER_HOST=192.168.x.x # set this to your host machine IP + extra_hosts: + - docker.host:192.168.x.x # set this to your host machine IP devices: - /dev/snd:/dev/snd # Mic and Speaker support - /dev/video0:/dev/video0 # Webcam support @@ -39,6 +40,6 @@ Telegram cannot open links from the container to host machine, and to work aroun #!/bin/bash XDG_OPEN_LISTENER_PORT-6969 -socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open"` +socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open" ``` k, thanks, bye diff --git a/docker-compose.yml b/docker-compose.yml index 3b919e5..db2784c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,8 @@ services: environment: - DISPLAY # For GUI access - XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server - - XDG_OPEN_LISTENER_HOST=192.168.x.x # set this to your host machine IP + extra_hosts: + - docker.host:192.168.x.xx # set this to your host machine IP devices: - /dev/snd:/dev/snd # Mic and Speaker support - /dev/video0:/dev/video0 # Webcam support diff --git a/socat-server.sh b/socat-server.sh new file mode 100755 index 0000000..890920d --- /dev/null +++ b/socat-server.sh @@ -0,0 +1,4 @@ +#!/bin/bash +XDG_OPEN_LISTENER_PORT-6969 + +socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open" diff --git a/xdg-open-listener.sh b/xdg-open-listener.sh index 74c7988..77e4155 100644 --- a/xdg-open-listener.sh +++ b/xdg-open-listener.sh @@ -1,3 +1,3 @@ #!/bin/bash -echo $1 | socat - TCP:$XDG_OPEN_LISTENER_HOST:$XDG_OPEN_LISTENER_PORT +echo $1 | socat - TCP:docker.host:$XDG_OPEN_LISTENER_PORT