I have searched some tutorials for creating Jenkins server with docker-compose but I still not sure if I need to add user: root or not. And how can I improve this docker-compose file?
Personally, I am not sure if there are any permission issues if not using the root user. Because the permission of my /home/jenkins_home folder is root:root. Perhaps I need to change to folder location?
To me, there is no need at all to be root for this container.
Change directory, or change the owner…
And then, you’ll maybe get in trouble because of UID. @dduportal educated me on this particular subject several times, and I have forgotten about that.
I am now using anonymous volumes so I don’t have this particular issue anymore.