Files
nicotine-less/entrypoint.sh
Claude 67cf32c4c6
Some checks failed
Build and Push Docker Image / check-version (push) Failing after 1s
Build and Push Docker Image / build (amd64, linux/amd64, linux-amd64) (push) Has been skipped
Build Base Runner Image / build-builder (linux/amd64, linux-amd64) (push) Has been cancelled
Build Base Runner Image / build-builder (linux/arm64, linux-arm64) (push) Has been cancelled
Build Base Runner Image / merge-builder (push) Has been cancelled
Build and Push Docker Image / build (arm64, linux/arm64, linux-arm64) (push) Has been skipped
Build and Push Docker Image / merge (push) Has been skipped
Initial commit: Nicotine-Less Docker container
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>
2025-10-20 02:14:44 +02:00

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 "$@"