From f5a019b6d2552788478e4a10cd17f7a2b453abb9 Mon Sep 17 00:00:00 2001 From: Roy Moore Date: Sat, 8 Jun 2024 03:40:21 +0300 Subject: [PATCH] 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 --- index.rst | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/index.rst b/index.rst index a9dca6df..9eb58cf4 100644 --- a/index.rst +++ b/index.rst @@ -106,22 +106,30 @@ When trying to launch a testcontainer from within a Docker container, e.g., in c Private Docker registry ----------------------- -Using a private docker registry requires the `DOCKER_AUTH_CONFIG` environment variable to be set. `official documentation ` +Using a private docker registry requires the `DOCKER_AUTH_CONFIG` environment variable to be set. +`official documentation `_ The value of this variable should be a JSON string containing the authentication information for the registry. +Example: + +.. code-block:: bash + + DOCKER_AUTH_CONFIG='{"auths": {"https://myregistry.com": {"auth": "dXNlcm5hbWU6cGFzc3dvcmQ="}}}' + In order to generate the JSON string, you can use the following command: -``echo -n '{"auths": {"": {"auth": "'$(echo -n ":" | base64 -w 0)'"}}}'`` -Example: -``DOCKER_AUTH_CONFIG='{"auths": {"https://myregistry.com": {"auth": "dXNlcm5hbWU6cGFzc3dvcmQ="}}}'`` +.. code-block:: bash + + echo -n '{"auths": {"": {"auth": "'$(echo -n ":" | base64 -w 0)'"}}}' Fetching passwords from cloud providers: -* ``ECR_PASSWORD = $(aws ecr get-login-password --region eu-west-1)`` -* ``GCP_PASSWORD = $(gcloud auth print-access-token)`` -* ``AZURE_PASSWORD = $(az acr login --name --expose-token --output tsv)`` +.. code-block:: bash + ECR_PASSWORD = $(aws ecr get-login-password --region eu-west-1) + GCP_PASSWORD = $(gcloud auth print-access-token) + AZURE_PASSWORD = $(az acr login --name --expose-token --output tsv) Configuration