feat: dockerize, fix sign in loop
This commit is contained in:
parent
3b3289dddf
commit
a8c578bd93
6 changed files with 127 additions and 13 deletions
20
docker/entrypoint.sh
Executable file
20
docker/entrypoint.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$VNC_ENABLED" = true ]; then
|
||||
set -- vnc-start "$@"
|
||||
fi
|
||||
|
||||
if [ "$EXPOSE_X11" = true ]; then
|
||||
set -- --listen-tcp "$@"
|
||||
fi
|
||||
|
||||
# 6000+SERVERNUM is the TCP port Xvfb is listening on:
|
||||
SERVERNUM=$(echo "$DISPLAY" | sed 's/:\([0-9][0-9]*\).*/\1/')
|
||||
|
||||
# Options passed directly to the Xvfb server:
|
||||
# -ac disables host-based access control mechanisms
|
||||
# −screen NUM WxHxD creates the screen and sets its width, height, and depth
|
||||
SERVERARGS="-ac -screen 0 ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH}"
|
||||
|
||||
exec tini -g -- \
|
||||
xvfb-run --server-num "$SERVERNUM" --server-args "$SERVERARGS" "$@"
|
||||
12
docker/vnc-start.sh
Executable file
12
docker/vnc-start.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Disable fbsetbg and start fluxbox in a background process:
|
||||
mkdir -p ~/.fluxbox && echo 'background: unset' >>~/.fluxbox/overlay
|
||||
fluxbox -display "$DISPLAY" &
|
||||
|
||||
# Start VNC in a background process:
|
||||
x11vnc -display "$DISPLAY" -forever -shared -rfbport "${VNC_PORT:-5900}" \
|
||||
-passwd "${VNC_PASSWORD:-secret}" &
|
||||
|
||||
# Execute the given command:
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue