nestybox/sysbox

Error in supervisord.conf of jenkins exemplary docker file

Opened this issue · 2 comments

While using the exemplary Dockerfile for Jenkins, I came across something that looks like an error in supervisord.conf.

The jenkins process is configured with username=jenkins, but I think it should be user=jenkins. This could save the next person some time.

According to supervisord.conf documentation:

username belongs to configuration of [unix_http_server], which is not what we're doing here.

user on the other hand:
Instruct supervisord to use this UNIX user account as the account which runs the program. The user can only be switched if supervisord is run as the root user. If supervisord can’t switch to the specified user, the program will not be started.

Thanks @sebastian-peter for catching this.

This means that supervisor.conf must have ignored username and therefore run Jenkins as root inside the Sysbox container (which is fine since it's root in the user-namespace of the container only, not on the underlying host machine). Nonetheless it's better to fix it to user=jenkins. I'll open a PR soon. Thanks!

BTW, were you able to verify things work with user=jenkins?

I'm using a slightly different Dockerfile, so it's hard to be 100% certain. One more thing that is missing (once Jenkins is not ran by root anymore) is providing the jenkins user with the rights to use docker. Thus I added a line RUN usermod -aG docker jenkins to the Dockerfile.