zaproxy / zaproxy

The ZAP core project

Home Page:https://www.zaproxy.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Platform Mismatch Error When Running zap2docker-stable:latest

sanketmctrl opened this issue · comments

Describe the bug

I am encountering a platform mismatch error when attempting to run the owasp/zap2docker-stable Docker image on my host system. The error indicates that the requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64/v3), leading to an exec format error.

Steps to reproduce the behavior

  1. Run the command docker pull owasp/zap2docker-stable on host machine.
  2. Execute the ZAP scan using the pulled image with the following command:
    docker run --rm -v /mnt/data/zap:/zap/wrk/:rw --user root owasp/zap2docker-stable bash -c "./zap-full-scan.py -t <target-website> -d -J report.json > /dev/null 2>&1 || true && cat /zap/wrk/report.json" > result.json
  3. Observe the error message:
    WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested exec /bin/bash: exec format error

Expected behavior

The owasp/zap2docker-stable Docker image should run without issues

Software versions

I am using docker desktop and pulling the image with latest tag

Screenshots

image

Errors from the zap.log file

No response

Additional context

I have also attempted to specify the platform using the --platform linux/amd64 flag during the Docker pull and run commands, but this did not resolve the issue. It seems that the latest tag may point to an ARM64 build, which is incompatible with AMD64 architecture without emulation.

I have noticed this happening after latest push of the docker image which happened on 11th April 2024, everything was working fine before that

Would you like to help fix this issue?

  • Yes

Duplicate of #8440

Duplicate of #8440


OWASP ZAP Docker images are no more, this should not be news:
https://www.zaproxy.org/blog/2023-08-01-zap-is-joining-the-software-security-project/#docker-hub
https://www.zaproxy.org/blog/2023-10-12-zap-2-14-0/#rebranding-and-docker-hub-move

(And many more posts in the user group and other places.)

For images that should be used: https://www.zaproxy.org/docs/docker/about/#install-instructions


Please refer to: https://www.zaproxy.org/download/#docker

As ZAP is no longer an OWASP project the images are moving away from the OWASP Docker org and will soon no longer be available there.

The images published today/this week are still a work in progress.