airsonic-refix icon indicating copy to clipboard operation
airsonic-refix copied to clipboard

Add support for running Docker container as non-root user

Open courtarro opened this issue 3 years ago • 1 comments

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.

courtarro avatar Feb 18 '22 16:02 courtarro

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

almereyda avatar May 26 '22 12:05 almereyda