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.
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 putenv.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.