Riley
Riley

Reputation: 21

OpenShift Source to Image push to private artifactory

We were able to successfully build our app using OpenShift Source To Image Patterns and create a Pod. I have few questions around this S2I

Where can I find the Image that is built using S2I in OpenShift ? How can I push the image that is created using S2I to private artifactory ?

If I want to rollback and go to different build it takes lot of time to build again

I could not find much resources around this.

Upvotes: 0

Views: 414

Answers (1)

hiroyukik
hiroyukik

Reputation: 816

I believed that you used BuildConfig resource to build your container image on Openshift. If you want to push your image to an external container registry. You need to edit your buildconfig as follows:

Before editing

spec:
  output:
    to:
      kind: "ImageStreamTag"
      name: "sample-image:latest"

After editing

spec:
  output:
    to:
      kind: "DockerImage"
      name: "my-registry.mycompany.com:5000/myimages/myimage:tag"
  1. https://docs.openshift.com/container-platform/4.11/cicd/builds/managing-build-output.html

Upvotes: 2

Related Questions