Pulling a custom execution environment from a private recent docker hub registry

,

With the latest awx (24.6.1) installed using docker compose, the Container Registry credential does not include any link to a private GPG key.

However, when pulling anything from a private recent docker hub registry,after logging with the right user/password, it is necessary to pass the password of the GPG privare key that was used to create the hub registry.

That’s why I get this error message when trying to launch any template which uses this custom ee:

Error: unable to copy from source docker://hub-kvm.example.com/awx-ee:26.06.15: initializing source docker://hub-kvm.example.com/awx-ee:26.06.15: reading manifest 26.06.15 in hub-kvm.example.com/awx-ee: authentication required

Manually pulling the ee from the private hub registry onto the server hosting the awx docker containers:

docker image ls --digests --all
REPOSITORY                         TAG             DIGEST                                                                       IMAGE ID       CREATED        SIZE
hub-kvm.example.com/awx_devel      24.6.1-v1.6.9   sha256:digest                                                                image_id      12 days ago    3.34GB
quay.io/sclorg/postgresql-15-c9s   latest          sha256:5dc641f7cfc4dc4c826b9bff512154100601cb63bfc71fd3e51066c159c84030   5dc641f7cfc4     13 days ago    519MB
redis                              latest          sha256:718f745deb7dfefeac6eed7041fc7ec9476b50e61b247932682457c41adafa0e   718f745deb7d     2 weeks ago    213MB
hub-kvm.example.com/awx-ee         26.06.15        sha256:digest                                                                image_id      3 months ago   2.79GB

… does not seem to help, as AWX does not see the custom awx-ee since it continues to try to pull the image each time a template depending on this awx-ee is launched if it is defined with ‘only pull the image if not present before running’.

If I change the awx-ee pull with ‘never pull container before running’, I get

Error: hub-kvm.example.com/awx-ee:26.06.15: image not known

I suppose the ee must be available inside the tools_awx_1 container instead of outside.

Maybe it’s possible to import the docker ee image into podman using scp?

awx-project

hello,
regardless of AWX, can you docker login / docker pull the ee from any machine with docker (or podman) installed ?
regards, J.

The solution is quite simple:

  1. pull the image from the docker hub registry into the host (not into the container due to GPG requirements)
  2. save the image locally with docker: docker save hub-kvm.example.com/awx-ee:26.06.15 -o /tmp/awx-ee.tar
  3. copy the tar into the container: docker cp -aL /tmp/awx-ee.tar "tools_awx_1:/tmp/awx-ee.tar"
  4. import the image into podman from within the container:
sh-5.1# podman load -i /tmp/awx-ee.tar
Getting image source signatures
Copying blob 786739c7f212 done   | 
Copying blob 5abdc8a828dd done   | 
Copying blob b888217cb50f done   | 
Copying blob 382961bb5b97 done   | 
Copying blob cf9095a74f4b done   | 
Copying blob daee0ffd6a0b done   | 
Copying blob a2ebfef7c402 done   | 
Copying blob 2c12a6403324 done   | 
Copying blob e64388a11fc9 done   | 
Copying blob ab6b8297d27a done   | 
Copying blob c3104213b82a done   | 
Copying blob 0c8b29dcdce4 done   | 
Copying blob 464f52037ea1 done   | 
Copying blob 125816e4d25b done   | 
Copying blob 077189d2adcd done   | 
Copying blob 835028f8e4b3 done   | 
Copying blob 4f4fb700ef54 skipped: already exists  
Copying blob 69ac9330d32e done   | 
Copying blob 0558d4c99e95 done   | 
Copying blob a2bbc36e0549 done   | 
Copying blob 4f4fb700ef54 skipped: already exists  
Copying blob 3e4a0d7f91f5 done   | 
Copying blob fc0a77423b44 done   | 
Copying blob 6165ccde9310 done   | 
Copying blob ede4b4e7c561 done   | 
Copying config 4422da1d95 done   | 
Writing manifest to image destination
Loaded image: hub-kvm.example.com/awx-ee:26.06.15

Listing all images:

sh-5.1# podman images
REPOSITORY                  TAG         IMAGE ID      CREATED       SIZE
hub-kvm.example.com/awx-ee  26.06.15    4422da1d9577  3 months ago  1.89 GB
quay.io/ansible/awx-ee      latest      8e78406f4916  4 months ago  2.69 GB

eh voila!