Skip to content

Commit 8e9b439

Browse files
authored
Add namespace to tesseract images (#1792)
`ko build` names the image after the name of the package that it's building, which in the case of the two tesseract binaries is just "gcp" and "posix", with no context on what those mean. This change extends the KO_DOCKER_REPO variable to include "tesseract" as part of the repo name, so the full image name will have "tesseract" in it. When browsing the scaffolding images, both images will still just appear as "gcp" and "posix". The alternative solution to make them more distinguishable in the web UI would be to use `--preserve-import-paths` which would produce an image named "github.com/transparency-dev/tesseract/cmd/tesseract/gcp", with full name "ghcr.io/sigstore/scaffolding/tesseract/github.com/transparency-dev/tesseract/cmd/tesseract/gcp". Signed-off-by: Colleen Murphy <[email protected]>
1 parent 2b610b5 commit 8e9b439

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ ko-resolve:
3434
LDFLAGS="$(LDFLAGS)" KO_DOCKER_REPO=$(KO_DOCKER_REPO) \
3535
ko build --base-import-paths --platform=all --tags $(OMNIWITNESS_VERSION),$(GIT_TAG),latest --image-refs imagerefs-gcp_omniwitness github.com/transparency-dev/witness/cmd/gcp/omniwitness
3636
# Building gcp_tesseract
37-
LDFLAGS="$(LDFLAGS)" KO_DOCKER_REPO=$(KO_DOCKER_REPO) \
37+
LDFLAGS="$(LDFLAGS)" KO_DOCKER_REPO="$(KO_DOCKER_REPO)/tesseract" \
3838
ko build --base-import-paths --platform=all --tags $(TESSERACT_VERSION),$(GIT_TAG),latest --image-refs imagerefs-gcp_tesseract github.com/transparency-dev/tesseract/cmd/tesseract/gcp
3939
# Building posix_tesseract
40-
LDFLAGS="$(LDFLAGS)" KO_DOCKER_REPO=$(KO_DOCKER_REPO) \
40+
LDFLAGS="$(LDFLAGS)" KO_DOCKER_REPO="$(KO_DOCKER_REPO)/tesseract" \
4141
ko build --base-import-paths --platform=all --tags $(TESSERACT_VERSION),$(GIT_TAG),latest --image-refs imagerefs-posix_tesseract github.com/transparency-dev/tesseract/cmd/tesseract/posix
4242

4343
.PHONY: ko-resolve-testdata

0 commit comments

Comments
 (0)