Skip to content

Add a 'nobody' user and group - #335

Merged
chanseokoh merged 1 commit into
GoogleContainerTools:masterfrom
thockin:master
Mar 25, 2019
Merged

chanseokoh merged 1 commit into
GoogleContainerTools:masterfrom
thockin:master

Conversation

@thockin

@thockin thockin commented Mar 25, 2019

Copy link
Copy Markdown
Contributor

Fixes #332

@chanseokoh

chanseokoh commented Mar 25, 2019 •

Copy link
Copy Markdown
Member

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

thockin commented Mar 25, 2019

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

thockin commented Mar 25, 2019 via email

Copy link
Copy Markdown
Contributor Author

Comment thread base/testdata/base.yaml Outdated
- 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
Copy Markdown
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

thockin commented Mar 25, 2019

Copy link
Copy Markdown
Contributor Author

all green

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

dlorenc commented Mar 25, 2019

Copy link
Copy Markdown
Contributor

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

I can tag it as latest soon

@thockin

thockin commented Mar 25, 2019 via email

Copy link
Copy Markdown
Contributor Author

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