Authenticate to the registries
You need to configure credentials for all registries that require authentication.
The following registries require authentication:
cp.icr.io
- The air gap registry host, which you configured in the
AIRGAP_REGISTRY_HOST
environment variable.
To authenticate to the registries, do the following steps.
- Configure the name of the authentication file to use to store the credentials for all source container
registries. You need to run the
export REGISTRY_AUTH_FILE
command only once.
The file name to use depends on the software or tool that you are using in your air-gapped process. The command and file names are shown in the following list.export REGISTRY_AUTH_FILE=path and file name to use for the auth credentials that are generated at login
- For Podman, the command is
After you run the command and then login with Podman, you can see that the file now contains the registry credentials. The typical file names for Podman are shown in the following list.export REGISTRY_AUTH_FILE=$HOME/.ibm-pak/auth.json
- For Linux®, the path and file name to use is $HOME/.config/containers/auth.json.
- For the Windows operating system, the path and file name to use is %USERPROFILE%/.config/containers/auth.json.
- For Docker, the command is
After you run the command and then login with Docker, you can see that the file now contains the registry credentials. The typical file names for Docker are shown in the following list.export REGISTRY_AUTH_FILE=$HOME/.docker/config.json
- For Linux, the path and file name to use is $HOME/.docker/config.json.
- For the Windows operating system, the path and file name to use is %USERPROFILE%/.docker/config.json.
- For Podman, the command is
- Authenticate to the public registry. When you log in to
cp.icr.io
, you must specify the user ascp
. The password is your entitlement key from the IBM® Cloud Container Registry. For more information, see IBM Container software library.The following example shows the command to use with Podman.podman login cp.icr.io
- Authenticate to the air gap registry host. The command to use to set credentials for the air gap registry
depends on the software or tool that you are using in your air-gapped process. The command and file names are
shown in the following list.
- For Podman, the command is
podman login ${AIRGAP_REGISTRY_HOST} -u ${AIRGAP_REGISTRY_USER} -p ${AIRGAP_REGISTRY_PASSWORD}
- For Docker, the command is
docker login ${AIRGAP_REGISTRY_HOST} -u ${AIRGAP_REGISTRY_USER} -p ${AIRGAP_REGISTRY_PASSWORD}
- For Podman, the command is