Skip to content

Commit 4f1202d

Browse files
authored
Merge pull request #84761 from stevsmit/29359-ocpbugs-podman
Updates IR docs to include Podman references
2 parents 8991b26 + 77d68fd commit 4f1202d

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

modules/images-allow-pods-to-reference-images-from-secure-registries.adoc

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@
66
[id="images-allow-pods-to-reference-images-from-secure-registries_{context}"]
77
= Allowing pods to reference images from other secured registries
88

9-
The `.dockercfg` `$HOME/.docker/config.json` file for Docker clients is a Docker credentials file that stores your authentication information if you have previously logged into a secured or insecure registry.
9+
To pull a secured container from other private or secured registries, you must create a pull secret from your container client credentials, such as Docker or Podman, and add it to your service account.
1010

11-
To pull a secured container image that is not from {product-registry}, you must create a pull secret from your Docker credentials and add it to your service account.
11+
Both Docker and Podman use a configuration file to store authentication details to log in to secured or insecure registry:
1212

13-
The Docker credentials file and the associated pull secret can contain multiple references to the same registry, each with its own set of credentials.
13+
* *Docker*: By default, Docker uses `$HOME/.docker/config.json`.
14+
* *Podman*: By default, Podman uses `$HOME/.config/containers/auth.json`.
15+
16+
These files store your authentication information if you have previously logged in to a secured or insecure registry.
17+
18+
[NOTE]
19+
====
20+
Both Docker and Podman credential files and the associated pull secret can contain multiple references to the same registry if they have unique paths, for example, `quay.io` and `quay.io/<example_repository>`. However, neither Docker nor Podman support multiple entries for the exact same registry path.
21+
====
1422

1523
.Example `config.json` file
1624
[source,json]
@@ -51,22 +59,24 @@ type: Opaque
5159

5260
.Procedure
5361

54-
* If you already have a `.dockercfg` file for the secured registry, you can create a secret from that file by running:
62+
* Create a secret from an existing authentication file:
63+
64+
** For Docker clients using `.docker/config.json`, enter the following command:
5565
+
5666
[source,terminal]
5767
----
5868
$ oc create secret generic <pull_secret_name> \
59-
--from-file=.dockercfg=<path/to/.dockercfg> \
60-
--type=kubernetes.io/dockercfg
69+
--from-file=.dockerconfigjson=<path/to/.docker/config.json> \
70+
--type=kubernetes.io/dockerconfigjson
6171
----
6272

63-
* Or if you have a `$HOME/.docker/config.json` file:
73+
** For Podman clients using `.config/containers/auth.json`, enter the following command:
6474
+
6575
[source,terminal]
6676
----
6777
$ oc create secret generic <pull_secret_name> \
68-
--from-file=.dockerconfigjson=<path/to/.docker/config.json> \
69-
--type=kubernetes.io/dockerconfigjson
78+
--from-file=<path/to/.config/containers/auth.json> \
79+
--type=kubernetes.io/podmanconfigjson
7080
----
7181

7282
* If you do not already have a Docker credentials file for the secured registry, you can create a secret by running:
@@ -85,4 +95,4 @@ $ oc create secret docker-registry <pull_secret_name> \
8595
[source,terminal]
8696
----
8797
$ oc secrets link default <pull_secret_name> --for=pull
88-
----
98+
----

0 commit comments

Comments
 (0)