You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only way to specify the image name is to rename a folder. Sometimes, the folder name has a generic name that makes sense only within the project context, but not as a global name.
There are 2 workarounds for this, but they both have their disadvantages:
use the full package name for image naming (e.g. github.com/company/repo/cmd/name) → I find this extremely cumbersome, and not particularly readable or easy to manipulate downstream
set KO_DOCKER_REPO to something like registry/repo → this would lead to an image name like repo/name
I find myself using option 2) the most, but I would like to have the freedom to specify custom image names.
Proposal
Note
Flag name and config option name are open to discussion
Use the build id to set the name of the image.
ko build --use-id ./cmd/name
alternatively, allow the user to specify this flag in the configuration, and just use ko build ./cmd/name
builds:
- id: foonameFromID: truemain: ./cmd/name
This would lead to an image named foo, despite being located in cmd/name
Let me know if the project is open to this proposal, and I'm happy to contribute it
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.
Description
Currently, the only way to specify the image name is to rename a folder. Sometimes, the folder name has a generic name that makes sense only within the project context, but not as a global name.
There are 2 workarounds for this, but they both have their disadvantages:
github.com/company/repo/cmd/name
) → I find this extremely cumbersome, and not particularly readable or easy to manipulate downstreamKO_DOCKER_REPO
to something likeregistry/repo
→ this would lead to an image name likerepo/name
I find myself using option 2) the most, but I would like to have the freedom to specify custom image names.
Proposal
Note
Flag name and config option name are open to discussion
Use the build
id
to set the name of the image.alternatively, allow the user to specify this flag in the configuration, and just use
ko build ./cmd/name
This would lead to an image named
foo
, despite being located incmd/name
Let me know if the project is open to this proposal, and I'm happy to contribute it
The text was updated successfully, but these errors were encountered: