How to create custom openJDK image with RHOCP4 CLI (oc client) installed
Issue
- How to install the
RHOCP4 CLI
(oc client
) in an openJDK image and create a custom container image? - How to create custom container image based on openJDK image with
RHOCP4 CLI
(oc client
) installed? -
The
oc
commands are failing with below error inside the openJDK container:$ podman exec -it <image-name>:<image-tag> /bin/bash # oc version bash: oc: command not found
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Podman
- 5
- Red Hat Enterprise Linux
- 7
- 8
- 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.