Skip to content

Commit f5a019b

Browse files
authoredJun 8, 2024··
docs: Update private registry instructions (#604)
Fix some issues with the private registry instructions: - issue with the link to official documentation - convert all relevant blocks to code-block - fix some typos
1 parent 2a5a190 commit f5a019b

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed
 

‎index.rst

+15-7
Original file line numberDiff line numberDiff line change
@@ -106,22 +106,30 @@ When trying to launch a testcontainer from within a Docker container, e.g., in c
106106
Private Docker registry
107107
-----------------------
108108

109-
Using a private docker registry requires the `DOCKER_AUTH_CONFIG` environment variable to be set. `official documentation <https://docs.docker.com/engine/reference/commandline/login/#credential-helpers>`
109+
Using a private docker registry requires the `DOCKER_AUTH_CONFIG` environment variable to be set.
110+
`official documentation <https://docs.docker.com/engine/reference/commandline/login/#credential-helpers>`_
110111

111112
The value of this variable should be a JSON string containing the authentication information for the registry.
112113

114+
Example:
115+
116+
.. code-block:: bash
117+
118+
DOCKER_AUTH_CONFIG='{"auths": {"https://myregistry.com": {"auth": "dXNlcm5hbWU6cGFzc3dvcmQ="}}}'
119+
113120
In order to generate the JSON string, you can use the following command:
114-
``echo -n '{"auths": {"<url>": {"auth": "'$(echo -n "<username>:<password>" | base64 -w 0)'"}}}'``
115121

116-
Example:
117-
``DOCKER_AUTH_CONFIG='{"auths": {"https://myregistry.com": {"auth": "dXNlcm5hbWU6cGFzc3dvcmQ="}}}'``
122+
.. code-block:: bash
123+
124+
echo -n '{"auths": {"<url>": {"auth": "'$(echo -n "<username>:<password>" | base64 -w 0)'"}}}'
118125
119126
Fetching passwords from cloud providers:
120127

121-
* ``ECR_PASSWORD = $(aws ecr get-login-password --region eu-west-1)``
122-
* ``GCP_PASSWORD = $(gcloud auth print-access-token)``
123-
* ``AZURE_PASSWORD = $(az acr login --name <registry-name> --expose-token --output tsv)``
128+
.. code-block:: bash
124129
130+
ECR_PASSWORD = $(aws ecr get-login-password --region eu-west-1)
131+
GCP_PASSWORD = $(gcloud auth print-access-token)
132+
AZURE_PASSWORD = $(az acr login --name <registry-name> --expose-token --output tsv)
125133
126134
127135
Configuration

0 commit comments

Comments
 (0)
Please sign in to comment.