Configure Repository Credentials
Use this procedure to configure your repository login credentials in your manifests.
- Install docker if you don't already have docker installed.
-
Log in to the Juniper Networks repository where you pull the container images.
docker login enterprise-hub.juniper.net
Enter your login credentials when prompted.
Once you've logged in, your credentials are automatically stored in ~/.docker/config.json. (If you installed docker using snap, then the credentials are stored in the ~/snap/docker directory hierarchy.)
-
Encode your credentials in base64 and store the resulting string.
ENCODED_CREDS=$(base64 -w 0 config.json)
-
Replace the credentials placeholder in the manifests with the encoded string.
The manifests have a
<base64-encoded-credential>
credentials placeholder. Simply replace the placeholder with the encoded string in all manifests.sed -i s/'<base64-encoded-credential>'/$ENCODED_CREDS/ *.yaml