1
0
mirror of https://github.com/ko-build/ko.git synced 2025-11-06 09:19:12 +02:00

Updating README for information on OpenShift (#346)

- Spellings and formatting from @ImjasonH

Signed-off-by: Chmouel Boudjnah <chmouel@chmouel.com>
This commit is contained in:
Chmouel Boudjnah
2021-04-28 21:20:24 +02:00
committed by GitHub
parent de98ea1b9c
commit aeb0830048

View File

@@ -373,6 +373,26 @@ Yes! `ko resolve -f -` will read and process input from stdin, so you can have
kustomize build config | ko resolve -f -
```
## Does `ko` work with [OpenShift Internal Registry](https://docs.openshift.com/container-platform/4.7/registry/registry-options.html#registry-integrated-openshift-registry_registry-options)?
Yes! Follow these steps:
* Connect to your OpenShift installation: https://docs.openshift.com/container-platform/4.7/cli_reference/openshift_cli/getting-started-cli.html#cli-logging-in_cli-developer-commands
* Expose the OpenShift Internal Registry so you can push to it: https://docs.openshift.com/container-platform/4.7/registry/securing-exposing-registry.html
* Export your token to `$HOME/.docker/config.json`:
```sh
oc registry login --to=$HOME/.docker/config.json
```
* Create a namespace where you will push your images, i.e: `ko-images`
* Execute this command to set `KO_DOCKER_REPO` to publish images to the internal registry.
```sh
export KO_DOCKER_REPO=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')/ko-images
```
# Acknowledgements
This work is based heavily on learnings from having built the