Passing an OpenShift secret into a Docker build

Solution Verified - Updated -

Issue

  • A secret key needs to be passed into a Docker build in OpenShift.
  • Example scenario: A build configuration is setup to pull a Docker file from a git repo using the secret SSH key in the project. Once that Docker build starts it also needs to pull from a git repo but needs access to credentials defined in OpenShift.

Environment

OpenShift Container Platform 3.5+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content