Some checks failed
Build and Push Docker Image / check-version (push) Failing after 2s
Build and Push Docker Image / build (linux/amd64, linux-amd64) (push) Has been skipped
Build and Push Docker Image / build (linux/arm64, linux-arm64) (push) Has been skipped
Build and Push Docker Image / create-manifest (push) Has been cancelled
Lightweight Docker container for Nicotine+ with noVNC web interface and Firefox ESR browser. Features: - noVNC web interface with dynamic resize support - Firefox ESR for testing ports and browsing - TigerVNC with AcceptSetDesktopSize enabled - Supervisor for process management - Configurable user/group permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Update PUID and PGID if needed
|
|
if [ ! -z "$PUID" ] && [ "$PUID" != "1000" ]; then
|
|
usermod -u $PUID nicotine
|
|
fi
|
|
|
|
if [ ! -z "$PGID" ] && [ "$PGID" != "1000" ]; then
|
|
groupmod -g $PGID nicotine
|
|
fi
|
|
|
|
# Fix permissions on volumes
|
|
chown -R nicotine:nicotine /config /downloads /incomplete 2>/dev/null || true
|
|
|
|
# Create necessary directories
|
|
mkdir -p /home/nicotine/.local/share/nicotine
|
|
chown -R nicotine:nicotine /home/nicotine/.local
|
|
|
|
# Create symlink from Nicotine+ config to persistent volume
|
|
if [ ! -L "/home/nicotine/.config/nicotine" ]; then
|
|
rm -rf /home/nicotine/.config/nicotine
|
|
ln -s /config /home/nicotine/.config/nicotine
|
|
fi
|
|
|
|
# Configure VNC password if specified
|
|
if [ ! -z "$VNC_PASSWORD" ]; then
|
|
mkdir -p /home/nicotine/.vnc
|
|
echo "$VNC_PASSWORD" | vncpasswd -f > /home/nicotine/.vnc/passwd
|
|
chmod 600 /home/nicotine/.vnc/passwd
|
|
chown nicotine:nicotine /home/nicotine/.vnc/passwd
|
|
fi
|
|
|
|
# Export environment variables for supervisord
|
|
export DISPLAY
|
|
export VNC_PORT
|
|
export NOVNC_PORT
|
|
export VNC_RESOLUTION
|
|
export VNC_DEPTH
|
|
export USER
|
|
|
|
# Start supervisord as root (which will start processes as nicotine user)
|
|
exec "$@"
|