tamland / airsonic-refix

Modern web UI for Subsonic compatible servers
GNU Affero General Public License v3.0
304 stars 48 forks source link

Add support for running Docker container as non-root user #60

Open courtarro opened 2 years ago

courtarro commented 2 years ago

Currently the entrypoint script writes the env.js file to a root-owned folder, so starting the Docker container as non-root causes this to fail. One standard approach is to put env.js in a subfolder that can be mounted as a volume instead, like /var/www/html/env/env.js. That way the Docker container can be set to start as the same user who owns the mounted volume.

The /var/www/html/env/ directory can exist within the image (owned by root) so that anyone wanting to run the server like before, as root, it will still work fine.

almereyda commented 2 years ago

The available container runs fine through Podman rootless:

podman run --rm -d -p 8080:80 -e SERVER_URL=http://navidrome:4533 tamland/airsonic-refix:latest