Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Add command that builds a KDT-expected docker image #8

Open
pratikmallya opened this issue Aug 5, 2020 · 1 comment
Open

Add command that builds a KDT-expected docker image #8

pratikmallya opened this issue Aug 5, 2020 · 1 comment

Comments

@pratikmallya
Copy link
Contributor

The publish command expects a locally built image with a certain tag. It expects an image with tag local-registry/<IMAGE_NAME> to exist and simply tags the local-registry/<IMAGE_NAME>:latest with a git hash and pushes it.

This is not ideal as:

  • this is an implicit assumption on how docker images should be built. local-registry is not a well known standard.
  • its possible that the :latest tag may be misleading. e.g. the image could have been built on a different version of the repo. Tagging the repo with the hash implies that it was built specifically for that hash, which publish doesn't really know if its true.

Proposed solution:

  • a kdt build command that builds a docker image in the style that KDT expects
  • not really sure if the kdt push behavior can be changed as its already in use. Perhaps it shouldn't re-tag latest but simply check if an image with the expected tag exists and push them. Could be enabled in a --strict mode I guess.
@joshk0
Copy link
Contributor

joshk0 commented Sep 24, 2020

What do you think about just erasing the prefix?

In other words kdt push foo retags the foo image as gcr.io/your-prefix/foo:sha1.

Most of the reasons that drive the local-registry thing had to do with people running local stacks on Docker for Mac, which is not a concern for the vast majority of KDT users at this point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants