how to start without supervisord?
i want start myself but entrypoint need pid1,can start without entrypoint?
There are multiple processes running in this container (not obeying the one container-one process rule). How are you going to manage multiple processes?
I can start them onebyone :( because I have a platform,They use docker in docker ,They defined the startup script to always be docker-init
If you want to start the entrypoint manually, then you could technically build the image with no entrypoint(just comment out the supervisord config section of entrypoint), exec to container and start the process via cli
ican start like this
#!/bin/bash
set -e
export DISPLAY=":20" # X11 display server address
export XDG_RUNTIME_DIR="/tmp" # Base directory for runtime files
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/tmp/dbus-system-bus.sock" # D-Bus system bus socket
export PIPEWIRE_RUNTIME_DIR="$XDG_RUNTIME_DIR" # PipeWire runtime directory
export PULSE_RUNTIME_PATH="$XDG_RUNTIME_DIR/pulse" # PulseAudio compatible path
# --------------------------
# 1. Initialize Runtime Directory
# --------------------------
# Create and secure the runtime directory for user services
mkdir -pm700 "$XDG_RUNTIME_DIR"
chown -f "$(id -nu):$(id -ng)" "$XDG_RUNTIME_DIR"
# --------------------------
# 2. Start D-Bus System Bus
# --------------------------
# Required for inter-process communication (IPC)
# --nofork: Run in foreground for script control
# --nosyslog: Disable syslog to prevent permission issues
dbus-daemon --system --nofork --nosyslog --nopidfile --address="$DBUS_SYSTEM_BUS_ADDRESS" &
DBUS_PID=$! # Capture PID for potential cleanup
# --------------------------
# 3. Execute Main Entrypoint
# --------------------------
# Runs the original entrypoint.sh which:
# - Sets up user permissions
# - Configures timezone
# - Initializes X11 server (Xvfb/Xorg)
# dbus-run-session: Creates isolated D-Bus session
dbus-run-session -- /etc/entrypoint.sh &
ENTRYPOINT_PID=$!
# --------------------------
# 4. Wait for X11 Server
# --------------------------
# Poll until X11 socket appears (created by entrypoint.sh)
echo "Waiting for X11 server to start..."
while [ ! -S "/tmp/.X11-unix/X${DISPLAY#*:}" ]; do
sleep 0.5
done
# --------------------------
# 5. Start Audio Subsystem
# --------------------------
# Modern audio server (replaces PulseAudio/ALSA)
pipewire & # Core audio/video engine
PIPEWIRE_PID=$!
wireplumber & # Session/policy manager
WIREPLUMBER_PID=$!
pipewire-pulse & # PulseAudio compatibility layer
PIPEWIRE_PULSE_PID=$!
# --------------------------
# 6. Start Graphics Service
# --------------------------
# Choose ONE of these remote desktop protocols:
# Option A: WebRTC streaming (modern)
/etc/selkies-gstreamer-entrypoint.sh &
GRAPHICS_PID=$!
# --------------------------
# 7. Wait for Graphics Service
# --------------------------
# Verify the graphics service is listening (default port 8081)
echo "Waiting for graphics service..."
while ! nc -z localhost 8081; do
sleep 0.5
done
# --------------------------
# 8. Start Web Reverse Proxy
# --------------------------
# Nginx exposes the streaming service externally
# daemon off: Run in foreground for container compatibility
nginx -g "daemon off;" &
NGINX_PID=$!
wait $GRAPHICS_PID