Airgap install failure due to 'unable to retrieve source image docker.io'

When installing DataPower Operator via Airgap, you may see the error unable to retrieve source image docker.io, preventing progress.

Symptoms

An error like the following will be seen:

error: unable to retrieve source image docker.io/ibmcom/datapower-monitor manifest sha256:7fcf67b696a32dc3f811d8e613ed822a0063c8989d141d23185825a0b6d49582: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

Workaround

Run the below sed command against your images-mapping.txt file.

images-mapping.txt can normally be located at:

~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping.txt

Command:

sed -i 's/docker\.io/icr\.io/g' <file> && \
sed -i 's/ibmcom/cpopen/g' <file>

Alternatively, run the following to make a bash script:

cat <<EOF > dockerToICR.sh
#!/bin/bash
​
IMAGE_MAPPING_TXT=\$1
sed -i 's/ibmcom/cpopen/g' \$IMAGE_MAPPING_TXT
sed -i 's/docker\.io/icr\.io/g' \$IMAGE_MAPPING_TXT
EOF

Make the file executable:

chmod +x dockerToICR.sh

Then pass in your path to images-mapping.txt as an argument to dockerToICR.sh.

Example:

./dockerToICR.sh <path>

Resolution

This issue is fixed in version 1.6.7.