docker_image requesting wrong image architecture on build #984
Labels
docker-plain
plain Docker (no swarm, no compose, no stack)
question
Further information is requested
SUMMARY
I'm having a problem building an image using docker_image for amd64 on my M1 Mac when using Ansible Molecule. I have replicated what the Docker Molecule plugin does into a simplified playbook and still get the same error.
ISSUE TYPE
COMPONENT NAME
docker_image
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Apple M1 Max, Sequoia 15.1, Python 3.11.10
STEPS TO REPRODUCE
Run the following commands after creating the playbook.yml and Dockerfile below.
export DOCKER_DEFAULT_PLATFORM=linux/amd64 docker pull --platform linux/amd64 geerlingguy/docker-rockylinux8-ansible:latest ansible-playbook playbook.yml
Playbook
Dockerfile
EXPECTED RESULTS
I expect that it successfully builds an amd64 image using the Dockerfile.
ACTUAL RESULTS
The playbook fails to build the Docker image and errors out reporting that it can't find the arm64 version of the Docker image.
The digests for the images from Docker hub are as follows:
As you can see at the bottom of the output it's failing to get the arm64 version of the image and failing when this should be the amd64 version of the image as the platform is defined as linux/amd64.
The text was updated successfully, but these errors were encountered: