Learn how to manage authentication credentials and access control for your DCR registry.
When you create a registry, default credentials are automatically generated and displayed:
Docker stores credentials in ~/.docker/config.json after login:
docker login dcr.nexqloud.io/your-registry-name
For additional security, use a credential helper:
# macOS Keychain
brew install docker-credential-helper
Store credentials as environment variables:
export DCR_USERNAME="your-username"
export DCR_PASSWORD="your-password"
export DCR_REGISTRY="dcr.nexqloud.io/your-registry-name"
Use in scripts:
echo "$DCR_PASSWORD" | docker login "$DCR_REGISTRY" -u "$DCR_USERNAME" --password-stdin
Store credentials securely in your CI/CD platform:
Add as repository secrets:
DCR_USERNAMEDCR_PASSWORDDCR_REGISTRYUse in workflow:
- name: Login to DCR
run: |
echo "${{ secrets.DCR_PASSWORD }}" | docker login ${{ secrets.DCR_REGISTRY }} \
-u ${{ secrets.DCR_USERNAME }} --password-stdin
Add as CI/CD variables:
DCR_USERNAMEDCR_PASSWORDDCR_REGISTRYUse in pipeline:
before_script:
- echo "$DCR_PASSWORD" | docker login "$DCR_REGISTRY" -u "$DCR_USERNAME" --password-stdin
Store credentials in Jenkins Credential Manager and reference in pipeline:
withCredentials([usernamePassword(
credentialsId: 'dcr-credentials',
usernameVariable: 'DCR_USERNAME',
passwordVariable: 'DCR_PASSWORD'
)]) {
sh 'echo $DCR_PASSWORD | docker login dcr.nexqloud.io/your-registry-name -u $DCR_USERNAME --password-stdin'
}
Regular credential rotation improves security:
Private registries (current default) require authentication:
When public registries become available:
To provide registry access to team members:
Store credentials as a Kubernetes secret:
kubectl create secret docker-registry dcr-credentials \
--docker-server=dcr.nexqloud.io/your-registry-name \
--docker-username=<username> \
--docker-password=<password> \
--docker-email=<email>
Reference the secret in pod specifications:
apiVersion: v1
kind: Pod
metadata:
name: myapp
spec:
containers:
- name: myapp
image: dcr.nexqloud.io/your-registry-name/myapp:latest
imagePullSecrets:
- name: dcr-credentials
Configure the default service account to use the secret:
kubectl patch serviceaccount default \
-p '{"imagePullSecrets": [{"name": "dcr-credentials"}]}'
If authentication fails:
# Test login
docker login dcr.nexqloud.io/your-registry-name -u username
If credentials have expired:
# Update Kubernetes secret
kubectl delete secret dcr-credentials
kubectl create secret docker-registry dcr-credentials \
--docker-server=dcr.nexqloud.io/your-registry-name \
--docker-username=<new-username> \
--docker-password=<new-password>
If you get permission errors: