jenkins docker plugin in pipeline use -u flag, how is possible to not using jenkins docker plugin in pipeline use -u flag, how is possible to not using docker docker

jenkins docker plugin in pipeline use -u flag, how is possible to not using


By default, when the user is not specified, docker lauches the container with the user defined in the dockerfile which if not specified is root.You can try to force the default user by passing it:

args '-u root:root -v /var/lib/jenkins/workspace/myworkspace:/tmp/' +                        ' -v /var/lib/jenkins/.ssh:/root/.ssh'