Difference between revisions of "~/.docker/config.json"

From wikieduonline
Jump to navigation Jump to search
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
https://docs.docker.com/engine/reference/commandline/cli/#docker-cli-configuration-file-configjson-properties
  
 +
~/[[.docker/]]config.json
 +
{
 +
  "[[credsStore]]": "desktop",
 +
  "[[credHelpers]]": {
 +
    "[[gcr.io]]": "gcloud",
 +
    "us.gcr.io": "gcloud",
 +
    "eu.gcr.io": "gcloud",
 +
    "asia.gcr.io": "gcloud",
 +
    "staging-k8s.gcr.io": "gcloud",
 +
    "marketplace.gcr.io": "gcloud"
 +
  }
 +
}%
  
  [[gcloud auth configure-docker]]
+
  ~/[[.docker/]]config.json
 +
{
 +
        "[[auths]]": {
 +
                "https://index.docker.io/v1/": {
 +
                        "[[auth]]": "XXXXXXXXXXXXX",
 +
                        "email": "[email protected]"
 +
                }
 +
        }
 +
}
 +
 
 +
<pre>
 +
~/.docker/config.json
 +
{
 +
"auths": {
 +
"012345678.dkr.ecr.eu-central-1.amazonaws.com": {}
 +
},
 +
"credsStore": "desktop",
 +
"credHelpers": {
 +
"asia.gcr.io": "gcloud",
 +
"eu.gcr.io": "gcloud",
 +
"gcr.io": "gcloud",
 +
"marketplace.gcr.io": "gcloud",
 +
"staging-k8s.gcr.io": "gcloud",
 +
"us.gcr.io": "gcloud"
 +
}
 +
}%
 +
</pre>
  
 
<pre>
 
<pre>
cat .docker/config.json
 
 
{
 
{
  "credsStore": "desktop",
+
"auths": {
  "credHelpers": {
+
    "https://index.docker.io/v1/": {
    "gcr.io": "gcloud",
+
      "auth": "bG90YXM6MjWQtYzlhZWJmNGFiZjMz"
    "us.gcr.io": "gcloud",
+
    }
    "eu.gcr.io": "gcloud",
+
  },
    "asia.gcr.io": "gcloud",
+
"credHelpers": {
    "staging-k8s.gcr.io": "gcloud",
+
"asia.gcr.io": "gcr",
    "marketplace.gcr.io": "gcloud"
+
"eu.gcr.io": "gcr,"
  }
+
"gcr.io": "gcr",
}%
+
"marketplace.gcr.io": "gcloud",
 +
"staging-k8s.gcr.io": "gcr",
 +
"us.gcr.io": "gcr"
 +
}}
 
</pre>
 
</pre>
  
 +
== Related ==
 +
* <code>[[~/.docker/daemon.json]]</code>
 +
* <code>[[gcloud auth configure-docker]]</code>
 +
* [[GitLab CI]]: <code>[[DOCKER_AUTH_CONFIG]]</code>
 +
* <code>[[docker login]]</code>
 +
* <code>[[~/.dockercfg]]</code>
 +
* [[Avalanche]]
 +
* [[Kubernetes secret]]: <code>[[kubernetes.io/dockerconfigjson]]</code>
 +
* [[Password]]
 +
* [[Pull an Image from a Private Registry in Kubernetes]]
  
 
== See also ==
 
== See also ==
* {{Docker}}
+
* {{docker config}}
 +
* {{docker login}}
 +
* {{Credential Helpers}}
 +
 
 +
[[Category:Computing]]

Latest revision as of 05:22, 18 July 2024

https://docs.docker.com/engine/reference/commandline/cli/#docker-cli-configuration-file-configjson-properties

~/.docker/config.json
{
  "credsStore": "desktop",
  "credHelpers": {
    "gcr.io": "gcloud",
    "us.gcr.io": "gcloud",
    "eu.gcr.io": "gcloud",
    "asia.gcr.io": "gcloud",
    "staging-k8s.gcr.io": "gcloud",
    "marketplace.gcr.io": "gcloud"
  }
}%
~/.docker/config.json
{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "XXXXXXXXXXXXX",
                        "email": "[email protected]"
                }
        }
}
 ~/.docker/config.json
 {
	"auths": {
		"012345678.dkr.ecr.eu-central-1.amazonaws.com": {}
	},
	"credsStore": "desktop",
	"credHelpers": {
		"asia.gcr.io": "gcloud",
		"eu.gcr.io": "gcloud",
		"gcr.io": "gcloud",
		"marketplace.gcr.io": "gcloud",
		"staging-k8s.gcr.io": "gcloud",
		"us.gcr.io": "gcloud"
	}
 }%
{
	"auths": {
    "https://index.docker.io/v1/": {
      "auth": "bG90YXM6MjWQtYzlhZWJmNGFiZjMz"
    }
   },
	"credHelpers": {
		"asia.gcr.io": "gcr",
		"eu.gcr.io": "gcr,"
		"gcr.io": "gcr",
		"marketplace.gcr.io": "gcloud",
		"staging-k8s.gcr.io": "gcr",
		"us.gcr.io": "gcr"
	}}

Related[edit]

See also[edit]

Advertising: