Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don’t force user when container starts #25

Closed
wants to merge 1 commit into from
Closed

don’t force user when container starts #25

wants to merge 1 commit into from

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jan 25, 2016

container may have been designed to start some services used during the build which won't support arbitrary user:group set by jenkins. -user option was introduced into docker-exec in 1.7.0

@ndeloof ndeloof changed the title don’t force user when container starts container may have been designed to start some services used during the build which won't support arbitrary user:group set by jenkins. -user option was introduced into docker-exec in 1.7.0 don’t force user when container starts Jan 25, 2016
@ndeloof
Copy link
Contributor Author

ndeloof commented Jan 25, 2016

@reviewbybees

@ghost
Copy link

ghost commented Jan 25, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@jenkinsadmin
Copy link
Member

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

argb.add("run", "-t", "-d", "-u", user);
argb.add("run", "-t", "-d");
if (user != null) {
argb.add("-u", user);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just delete this parameter, assuming there is no other use.

@jglick
Copy link
Member

jglick commented Jan 25, 2016

Sounds right; did you check the functional tests (not currently run by CI), and the demo image? Also IIRC @svanoort and @rtyler had some experiences relating to UID and Image.inside so they may wish to comment.

@svanoort
Copy link
Member

I think if I read this correctly, it won't pose an issue for docker.inside because the Decorator is still fetching the current UID (needed for the workspace mounting). However there are options to run without a supplied user id. There's some complexity in the groovy that invokes these though, which I don't 100% follow.

@ndeloof is this accurate?

@jglick
Copy link
Member

jglick commented Apr 19, 2016

Is this addressing JENKINS-34289?

@ndeloof
Copy link
Contributor Author

ndeloof commented Apr 19, 2016

assuming JENKINS-34289 is about entrypoint running some commands the forced user can't execute, this indeed would solve it.

@docwhat
Copy link
Member

docwhat commented Apr 19, 2016

Yeah, I think that was only part of the issue... because I worked around it by creating the correct user/group in the container before running it.

@antoniobeyah
Copy link

I am running into this same issue- I was able to merge this pr locally and get the plugin working in my jenkins. Are we able to get this PR merged?

If you want, I can resolve the conflicts and get this passing. The conflicts are minimal and pretty easy to resolve.

cc: @ndeloof @jglick

@jglick
Copy link
Member

jglick commented Jun 29, 2016

Are we able to get this PR merged?

If you can

  • resolve the merge conflicts
  • verify whether or not this is fixing JENKINS-34289
  • provide some kind of test case demonstrating that the PR fixes something (an automated test in src/test/java/ would be ideal, but if that is technically challenging, descriptive steps for running such a test manually would suffice)

@antoniobeyah
Copy link

sounds good, i'll likely start working on this tomorrow.

@kevinroisin
Copy link

+1 for this. If I may, what's the status of it?

@j1n6
Copy link

j1n6 commented Aug 1, 2016

This would be really handy. +1

@jglick
Copy link
Member

jglick commented Aug 30, 2016

Superseded by #60 I suppose.

@jglick
Copy link
Member

jglick commented Aug 31, 2016

#57 I meant of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants