Created
November 16, 2018 13:03
-
-
Save jorgemoralespou/4f9115c9fb3bf5be630f4a5320692e8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_USER=${1:-$ACCESS_REDHAT_USERNAME} | |
_PASSWORD=${2:-$ACCESS_REDHAT_PASSWORD} | |
[ "" == "${_USER}" ] || [ "" == "${_PASSWORD}" ] && echo "${BASH_SOURCE[0]} <RedHat_access_user> <RedHat_access_password>" && exit 1 | |
oc create secret docker-registry access-red-hat --docker-server=registry.redhat.io --docker-username=${_USER} --docker-password=${_PASSWORD} [email protected] -n openshift --as system:admin | |
oc secrets link default access-red-hat --for=pull -n openshift --as system:admin | |
oc apply -f https://raw.githubusercontent.com/openshift/library/master/official/java/imagestreams/java-rhel7.json -n openshift --as system:admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment