8000
Skip to content

Handle user:group specification in Dockerfile#471

Merged
openshift-bot merged 1 commit intoopenshift:masterfrom
csrwng:user_spec
Apr 27, 2016
Merged

Handle user:group specification in Dockerfile#471
openshift-bot merged 1 commit intoopenshift:masterfrom
csrwng:user_spec

Conversation

@csrwng
Copy link
Copy Markdown
Contributor
@csrwng csrwng commented Apr 21, 2016

When checking whether a user is in the allowed range, a USER directive with uid:group is now allowed.

@csrwng
Copy link
Copy Markdown
Contributor Author
csrwng commented Apr 21, 2016

@bparees ptal

Comment thread pkg/docker/util.go
if strings.ToLower(parts[0]) != "user" {
continue
}
uname := extractUser(parts[1])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this also trimming the uname?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's not... it should. Will fix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@csrwng csrwng force-pushed the user_spec branch 2 times, most recently from 00453b3 to bc7a8d1 Compare April 21, 2016 15:16
@bparees
Copy link
Copy Markdown
Contributor
bparees commented Apr 21, 2016

lgtm.

Comment thread pkg/docker/util_test.go
name: "AllowedUIDs is set, numeric user with group",
allowedUIDs: rangeList("1-"),
user: "5:5000",
expectErr: false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should add a test for:

5:users

That is, named group if want to ensure coverage of all cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added, thx

@mfojtik
Copy link
Copy Markdown
Contributor
mfojtik commented Apr 22, 2016

LGTM, pending fixing @GrahamDumpleton check

@GrahamDumpleton
Copy link
Copy Markdown
GrahamDumpleton commented Apr 22, 2016

Hold off merging this. As per comments on original issue, this may be pointless as deployer may not use the group anyway. If that is the case, need to work out if deployer should/can honour the group in Docker image data.

@csrwng
Copy link
Copy Markdown
Contributor Author
csrwng commented Apr 22, 2016

@GrahamDumpleton I believe we still need the fix for s2i not to reject images unnecessarily. We're simply not interpreting the user spec in a Dockerfile correctly right now.

@bparees
Copy link
Copy Markdown
Contributor
bparees commented Apr 25, 2016

@csrwng +1, i think this fix is as good as it can get from an s2i perspective. lgtm.

@GrahamDumpleton
Copy link
Copy Markdown

I have created openshift/origin#8618 for wider issue of changing Kubernetes/OpenShift to honour the group. This change in this patch is still useful in context of standalone S2I usage, but images produced still aren't going to necessarily run properly on OpenShift.

@bparees
Copy link
Copy Markdown
Contributor
bparees commented Apr 27, 2016

@csrwng @GrahamDumpleton are we in agreement that this PR is as complete as it's going to get?

@csrwng
Copy link
Copy Markdown
Contributor Author
csrwng commented Apr 27, 2016

yes

@bparees
Copy link
Copy Markdown
Contributor
bparees commented Apr 27, 2016

[merge]

@openshift-bot
Copy link
Copy Markdown
Contributor
openshift-bot commented Apr 27, 2016

Source To Image Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pr_sti/68/)

@openshift-bot
Copy link
Copy Markdown
Contributor

Evaluated for source to image merge up to 5b3f5ca

@openshift-bot openshift-bot merged commit 3fd86ad into openshift:master Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet
4EB8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0