Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push linux/amd64 Docker image #223

Open
thc202 opened this issue Mar 21, 2024 · 8 comments
Open

Push linux/amd64 Docker image #223

thc202 opened this issue Mar 21, 2024 · 8 comments

Comments

@thc202
Copy link
Contributor

thc202 commented Mar 21, 2024

The latest Docker image pushed is now linux/arm64 which makes it very slow when running from linux/amd64, so much that the initial start up is longer than 1 minute and breaks our tests, e.g.: https://github.com/zapbot/zap-mgmt-scripts/actions/runs/8370459364/job/22917853473#step:3:1

We can increase the wait time but it would be better if it was still provided linux/amd64 as before, which is the most common.

@thc202
Copy link
Contributor Author

thc202 commented Mar 21, 2024

We ended up disabling the scans in CI it takes too long to start.

@davewichers
Copy link
Contributor

I'm happy to fix it if you explain how. The Docker file is build using these two files in the VMs folder: Dockerfile and buildDockerImage.sh. How do I change this to use linux/amd64 rather than linux/arm64? Or, I could create a different Docker file for ZAPs use to use amd64. I'd like to track down who/when this was changed and if it was a 'contribution' ask them author why. Or maybe the latest ubuntu is now arm64??

@thc202
Copy link
Contributor Author

thc202 commented Mar 25, 2024

You can create the image with different architectures: https://docs.docker.com/build/building/multi-platform/
I'd suggest that as it would be faster when running in both amd64 and arm64. You could also create a GitHub workflow to build/publish the images (e.g.: https://github.com/zaproxy/zaproxy/blob/59a6ccab8b210b953e0348bfb337b3416e6c4329/.github/workflows/release-main-docker.yml).

I think a different host was used (with different processor) to build/publish the image.

@davewichers
Copy link
Contributor

@thc202 - Please try to the new Docker image I pushed out. It should be specific to AMD64. I'm working on pushing out an ARM64 version too, but need permission to create/push a new Docker image at docker.io.

@thc202
Copy link
Contributor Author

thc202 commented May 7, 2024

A separate image should not be needed, the same image can have different architectures.

@davewichers
Copy link
Contributor

@thc202 - you said that before but I couldn't figure out how to do that. If you know how, and can implement via a pull request, that would be great. Regardless, did you confirm the AMD64 image works for you?

@thc202
Copy link
Contributor Author

thc202 commented May 7, 2024

What type of changes are you looking for? A workflow to publish them?

I did not yet, will do that in the following days.

@davewichers
Copy link
Contributor

@thc202 - no, the command line commands required to create one docker image that supports BOTH architectures. I can then publish that one image to docker.io like I do now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants