got rid of tcp, instead using unix sockets
This commit is contained in:
@ -16,9 +16,6 @@ services:
|
|||||||
image: git.shihaam.dev/dockerfiles/64gram
|
image: git.shihaam.dev/dockerfiles/64gram
|
||||||
environment:
|
environment:
|
||||||
- DISPLAY # For GUI access
|
- DISPLAY # For GUI access
|
||||||
- XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server
|
|
||||||
extra_hosts:
|
|
||||||
- docker.host:192.168.x.x # set this to your host machine IP
|
|
||||||
devices:
|
devices:
|
||||||
- /dev/snd:/dev/snd # Mic and Speaker support
|
- /dev/snd:/dev/snd # Mic and Speaker support
|
||||||
- /dev/video0:/dev/video0 # Webcam support
|
- /dev/video0:/dev/video0 # Webcam support
|
||||||
@ -29,6 +26,7 @@ services:
|
|||||||
- $HOME/Documents:/root/Documents # Documents folder
|
- $HOME/Documents:/root/Documents # Documents folder
|
||||||
- /usr/share/icons:/usr/share/icons # Icons for UI, like Mouse cursor
|
- /usr/share/icons:/usr/share/icons # Icons for UI, like Mouse cursor
|
||||||
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
|
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
|
||||||
|
- /tmp/xdg-open.socket:/tmp/xdg-open.socket # Add support for xdg-open
|
||||||
```
|
```
|
||||||
obviously change the docker.host to your host machines IP. \
|
obviously change the docker.host to your host machines IP. \
|
||||||
and run `podman-compose up -d` or if you wanna live dangerously then you may..: `docker compose up -d`
|
and run `podman-compose up -d` or if you wanna live dangerously then you may..: `docker compose up -d`
|
||||||
@ -37,8 +35,6 @@ Telegram cannot open links from the container to host machine, and to work aroun
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
XDG_OPEN_LISTENER_PORT=6969
|
socat UNIX-LISTEN:/tmp/xdg-open.socket,fork EXEC:"xargs -n 1 xdg-open"
|
||||||
|
|
||||||
socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open"
|
|
||||||
```
|
```
|
||||||
k, thanks, bye
|
k, thanks, bye
|
||||||
|
@ -7,9 +7,6 @@ services:
|
|||||||
image: git.shihaam.dev/dockerfiles/64gram
|
image: git.shihaam.dev/dockerfiles/64gram
|
||||||
environment:
|
environment:
|
||||||
- DISPLAY # For GUI access
|
- DISPLAY # For GUI access
|
||||||
- XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server
|
|
||||||
extra_hosts:
|
|
||||||
- docker.host:192.168.x.xx # set this to your host machine IP
|
|
||||||
devices:
|
devices:
|
||||||
- /dev/snd:/dev/snd # Mic and Speaker support
|
- /dev/snd:/dev/snd # Mic and Speaker support
|
||||||
- /dev/video0:/dev/video0 # Webcam support
|
- /dev/video0:/dev/video0 # Webcam support
|
||||||
@ -20,3 +17,4 @@ services:
|
|||||||
- $HOME/Documents:/root/Documents # Documents folder
|
- $HOME/Documents:/root/Documents # Documents folder
|
||||||
- /usr/share/icons:/usr/share/icons # Icons for UI, like Mouse cursor
|
- /usr/share/icons:/usr/share/icons # Icons for UI, like Mouse cursor
|
||||||
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
|
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
|
||||||
|
- /tmp/xdg-open.socket:/tmp/xdg-open.socket # Add support for xdg-open
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
XDG_OPEN_LISTENER_PORT=6969
|
socat UNIX-LISTEN:/tmp/xdg-open.socket,fork EXEC:"xargs -n 1 xdg-open"
|
||||||
|
|
||||||
socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open"
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo $1 | socat - TCP:docker.host:$XDG_OPEN_LISTENER_PORT
|
echo $1 | socat - UNIX-CONNECT:/tmp/xdg-open.socket
|
||||||
|
Reference in New Issue
Block a user