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

Add a 'nobody' user and group #335

Merged
merged 1 commit into from
Mar 25, 2019
Merged

Add a 'nobody' user and group #335

merged 1 commit into from
Mar 25, 2019

Conversation

thockin
Copy link
Contributor

@thockin thockin commented Mar 25, 2019

Fixes #332

@chanseokoh
Copy link
Member

chanseokoh commented Mar 25, 2019

Please fix the formatting error: #291 (comment)

Let's use the number 65534 instead of 65535. That's the number on my machine, and it is only beneficial to avoid 65535: https://superuser.com/questions/706338/why-on-some-systems-max-uid-gid-is-65534-an-not-65535

@thockin
Copy link
Contributor Author

thockin commented Mar 25, 2019

I have changed numbers and run buildifier.

Separate bug:

When I run ./buildifier.sh, I get no output and a success error code.

When I run buildifier -mode=check $(find . -name 'BUILD*' -o -name 'WORKSPACE*' -type f), I get a flag on base/BUILD but a success error code.

buildifier.sh is checking for a non-success error code, so it will never work.

As a casual contributor, it's scary to be told "Go wget and run this binary". It would be nicer if that was more transparent (and in fact if it "just worked" from HEAD -- even a docker run in a script...)

@chanseokoh
Copy link
Member

Seems like a test failure. Please fix.

Separate bug:

Probably there's something broken about that. Please file a bug. I maintain Java part of distroless, so I honestly don't know very well about the buildifier stuff.

@thockin
Copy link
Contributor Author

thockin commented Mar 25, 2019 via email

@@ -34,7 +34,7 @@ fileExistenceTests:
fileContentTests:
- name: 'known users'
path: '/etc/passwd'
expectedContents: ['^root:x:0:0:user:/home:/bin/bash\n$']
expectedContents: ['^root:x:0:0:user:/home:/bin/bash\nnobody:x:65534:65534:user:/hom:/bin/bash\n$']
Copy link
Member

Choose a reason for hiding this comment

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

Test still failing. Probably /hom: --> /home:.

@thockin
Copy link
Contributor Author

thockin commented Mar 25, 2019

all green

@chanseokoh chanseokoh merged commit acf95ce into GoogleContainerTools:master Mar 25, 2019
@dlorenc
Copy link
Contributor

dlorenc commented Mar 25, 2019

@thockin there's an image with this change published here: gcr.io/distroless/base:5eb0f8a01ed8046cefc3a7ca9cf5b95bad296dcf

I can tag it as latest soon

@thockin
Copy link
Contributor Author

thockin commented Mar 25, 2019 via email

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.

3 participants