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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.