Notes for debugging s2i build issues locally without having to run through the change-push-build model and to allow for some flexibility when debugging. This helps in identifying any issues in the application build process or incompatibilities with any of the s2i stages.
- You have docker, s2i and openshift-cli installed locally.
- openshift-cli is logged in to the correct cluster.
docker login -u $(oc whoami) -p $(oc whoami -t) ${REGISTRY_URI}
This is more optional as the image would get fetched when running s2i anyway, and good to ensure the repo is all good.
docker pull ${REGISTRY_URI}/awesome-s2i-image
s2i build /path/to/source ${REGISTRY_URI}/awesome-s2i-image local/awesome-application
Once this is setup; you can use the image as a normal image. Note that SELinux might not like it when executing s2i images with USER 1001
etc specified in the image.