kyma-project / cli

Simple set of commands to manage a Kyma installation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide new command that outputs `config.json` file to be used in docker CLI against internal docker registry

kwiatekus opened this issue · comments

Description

Add a new command that would output docker registry config in form of docker's config.json containing kyma's docker registry external url and auth data:

{
	"auths": {
		"{external url of docker registry}": {
			"auth": "{base64 encoded `user:password`}"
		}
	}
}

If the docker registry secret is not present (i.e docker-registry module is not installed), then output information saying that there is no docker registry module installed.

kyma alpha registry config --dockerconfig (--output config.json)
URL = $(kyma alpha registry config --externalurl )
docker --config {PATH to config.json} push ${URL}/my-app:{tag}

Reasons

Kyma can be provisioned with internal docker registry.
The registry will prove useful only if it is easy to use it with docker CLI locally or in a CI workflow context.

Attachments
https://lumaks.medium.com/creating-docker-config-json-for-use-in-external-systems-a5d14aa81c41

Related topics:
kyma-project/kyma#18555
kyma-project/kyma#18198

Works.
It is already used in the sample pipeline for kyma automation