This looks good actually. Apparently, when you copy files using the COPY instructions, the files get copied with the root as the default user and group. So you have to change the ownership of the files when using the COPY instruction using the --chown option.
You can always adjust the runtime configuration resources (ram, CPU, swap, etc) of containers.
That’s the one, yes!
Permissions have to be set for the right folder and files so that the app user can perform all the tasks like “npm install” …
Thanks @theubsin
As many said before, the COPY command is executed with the ROOT user, so, the app folder is owned by the root.
When copying, we need to change the user to our target user.