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

Print the entry point of the images #496

Closed
rakyll opened this issue Nov 10, 2021 · 4 comments · Fixed by #499
Closed

Print the entry point of the images #496

rakyll opened this issue Nov 10, 2021 · 4 comments · Fixed by #499

Comments

@rakyll
Copy link

rakyll commented Nov 10, 2021

When building, print the entry point of the images for users who wants to customize the entry point. Without the entry point printed, it's not clear where the binary is stored without building a debug image.

@imjasonh
Copy link
Member

I'm a weak -1 on printing this out during build, but I could be convinced. Aside from added spam in the logs, the bigger reason is that:

[ko] aims to make packaging, pushing, and referencing container images an invisible implementation detail of your Kubernetes deployment, and let you focus on writing code in Go.

If you have to care about what your image's entrypoint is, we've probably done something wrong. There currently isn't a way to change that location within the image at all, and we've sort of resisted adding one.

Would you accept adding a sentence to the README that documents the location of the binary in the image, in case a user happens to care?

@rakyll
Copy link
Author

rakyll commented Nov 11, 2021

The rationale behind this request is container orchestrators/products require you to provide the entry point if you want to override the default arguments. When I have to provide the binary name with the arguments, I need to know where the binary is.

Would you accept adding a sentence to the README

Yes, documentation is sufficient.

@rakyll
Copy link
Author

rakyll commented Nov 11, 2021

One more thing. It only takes one debug image to figure it that it's under /ko-app but given the binary name is generated from the package name, I thought that maybe it would be good to print it at ko publish but it's fair to say ko users shouldn't know what's in the image.

@jonjohnsonjr
Copy link
Collaborator

I thought that maybe it would be good to print it at ko publish but it's fair to say ko users shouldn't know what's in the image.

I think this could still be reasonable, but I'm a little concerned about spamming logs too much.

It's fairly straightforward (for me) to do:

$ crane config $(ko publish . 2>/dev/null) | jq .config.Entrypoint
[
  "/ko-app/ko"
]

... but I understand that this could be simpler for people who don't care about container tooling that much 😅

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 a pull request may close this issue.

3 participants