The user to run build has to be the same as the Jenkins slave user so files created in workspace have adequate owner and permission set. Side effect is you can't configure the user to run inside docker (until Docker do support user namespace)
For many usages this restriction can be frustrating, so as a workaround you can configure user's group ID
to gain extra privileges in your container. For sample, if you want to run
Docker in Docker, you can set group as 'docker
'.