Specify which "user" shall run the job (docker-executor)
Description
By default and unless a Docker image as set a default user, an image is run as root user. So when a user select image: ruby:2.4
or image: maven:3-jdk-8
, the user that will execute the ruby program or build the project will run as root.
Currently there is no way to define a default user inside the GitLab Runner's config.toml
file nor to override it inside the .gitlab-ci.yml
file.
Proposal
-
Add an option to enable a runner administrator the ability to define a default user to use for running the CI job container (aka override the default user).
-
A GitLab CI user can define in its
.gitlab-ci.yml
job description that the image should bejetty
and that the user should bejetty
as well.
e.g.image_user: jetty
or something more complex:
image:
name: jetty:latest
user: jetty
Links to related issues and merge requests / references
None yet.