How-To – using images from central registry in production (atomic registry)

This how-to covers what has to be done to pull an image located in atomic registry into an openshift deployment.

General steps:

  • add secret
  • add pull secret to build configuration

see also

https://docs.openshift.com/container-platform/3.3/dev_guide/builds.html

secret to access private central docker registry

oc secrets new-dockercfg registry-appaoc-roambee
--docker-server='registry-appaoc.tsi-af.de:443'--docker-password=eyJh...14wA
--docker-email=unused --docker-username=unused

use provided token for password

when using a build configuration, add to build configuration

oc set build-secret --pull bc/telegraf registry-appaoc-roambee

when using a deployment configuration, add secret to service account

oc secrets add sa/default secrets/registry-appaoc-roambee --for=pull