Skip to content

Instantly share code, notes, and snippets.

@abn
Last active May 27, 2017 10:38
Show Gist options
  • Save abn/0a3e1d140cbb4d117da5e09b861b2cf3 to your computer and use it in GitHub Desktop.
Save abn/0a3e1d140cbb4d117da5e09b861b2cf3 to your computer and use it in GitHub Desktop.
OpenShift Debugging: S2I Build Failures

OpenShift Debugging: S2I Build Failures

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.

Requirements

  1. You have docker, s2i and openshift-cli installed locally.
  2. openshift-cli is logged in to the correct cluster.

Prepare Docker Repository Access

Login to repository

docker login -u $(oc whoami) -p $(oc whoami -t) ${REGISTRY_URI}

Pull the s2i image

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

Buid Locally

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment