The base image doesn't contain the 'oc' binary. It is added as part of the demo.oc_connection molecule prepare stage, but that is the wrong place to fix it. Prepare is run and sets things up, but it doesn't reload the PATH env in a way that it works in that same run.
It would be preferred that the oc binary is grabbed from the local cluster rather than packaging it in the image for several reasons.
Avoids bloating the image
Ensures the client and server versions of OpenShift match
Leverages a service of OCP that is consistent across every deployment
Rather than having the the prepare stage of molecule setup the system, it would be better if it could be handled as part of an initialization script. If there is a way to add scripts to the dev space configuration file to run-once, the jobs in the prepare stage could be moved to a simple playbook / script.
The base image doesn't contain the 'oc' binary. It is added as part of the demo.oc_connection molecule prepare stage, but that is the wrong place to fix it. Prepare is run and sets things up, but it doesn't reload the PATH env in a way that it works in that same run.
It would be preferred that the oc binary is grabbed from the local cluster rather than packaging it in the image for several reasons.
Rather than having the the prepare stage of molecule setup the system, it would be better if it could be handled as part of an initialization script. If there is a way to add scripts to the dev space configuration file to run-once, the jobs in the prepare stage could be moved to a simple playbook / script.