-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Base entrypoint image on distroless #2562
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
25b2feb
to
7adde75
Compare
cmd/entrypoint/main.go
Outdated
} | ||
defer s.Close() | ||
|
||
d, err := os.OpenFile(dst, os.O_RDWR|os.O_CREATE, 0777) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 777 what we want? isnt that 644 the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default for os.Create
is 0666. With that, or 0644, subsequent steps fail with exec: \"/tekton/tools/entrypoint\": permission denied": unknown
because the other group doesn't have permission to execute.
0667 works, or as little as 0311 (owner can write, anybody can execute), but I didn't really feel strongly about limiting permissions on the executable. I can knock it down to 0311 though.
The only reason it was based on busybox was to have access to `cp`, which it used to copy its binary to /tekton/tools for use in later steps. Instead of relying on `cp`, this adds a "cp mode" to the entrypoint binary itself. When invoked with the positional args `cp <src> <dst>`, it copies src to dst using Go's os and io packages.
If you were to just create |
That would only work if I somehow got the
Is that more straightforward than having a |
Yeah, sorry wires crossed in my head. I thought this was to enable more direct usage of |
For future reference, warm-image's |
Closing in favor of #2606 for now. |
With I've rebased this on /reopen But still: |
@imjasonh: Failed to re-open PR: state cannot be changed. The entrypoint-cp branch was force-pushed or recreated. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can't reopen this, created #3286 instead 🤷♂️ |
The only reason it was based on busybox was to have access to
cp
,which it used to copy its binary to /tekton/tools for use in later
steps.
Instead of relying on
cp
, this adds a "cp mode" to the entrypointbinary itself. When invoked with the positional args
cp <src> <dst>
,it copies src to dst using Go's os and io packages.
/hold for discussion
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes