Docker image with addOns from local repository

165 views
Skip to first unread message

Shubham Patel

unread,
Jun 8, 2022, 1:08:23 AM6/8/22
to OWASP ZAP Developer Group
Hi

I've added one plugin in the zap-extension repository and I want to build a docker image of zap which has this plugin. I can't release the plugin because the plugin is not complete. Is there a way to make a docker image from dockerfile where I don't need to add a plugin after the docker image build?
I've run the copyAddon Gradle command to copy my plugin to zapproxy repository but when I build the docker image It's downloading zap from online. Does anyone has created dockerFile which builds docker image locally with all local addOns? 

Thanks,

thc...@gmail.com

unread,
Jun 8, 2022, 3:31:45 AM6/8/22
to zaproxy...@googlegroups.com
Hi.

If you just want to include your add-on in the image, edit the
corresponding Docker build file to copy the add-on.

To build everything from source you'll have to change the live Docker
build file to point to your zaproxy repository and edit
https://github.com/zaproxy/zaproxy/blob/11cad5b9498b590cbdcfffa8486768a689219e3e/zap/src/main/weekly-add-ons.json
to point to your other repositories, also add your add-on to the
zap-extensions list.

Best regards.

On 08/06/2022 06:08, 'Shubham Patel' via OWASP ZAP Developer Group wrote:
> Hi
>
> I've added one plugin in the zap-extension repository and I want to build a
> docker image of zap which has this plugin. I can't release the plugin
> because the plugin is not complete. Is there a way to make a docker image
> from *dockerfile* where I don't need to add a plugin after the docker image
> build?
> I've run the *copyAddon* Gradle command to copy my plugin to zapproxy

Shubham Patel

unread,
Jun 8, 2022, 10:47:38 AM6/8/22
to OWASP ZAP Developer Group
Yes, this helped me understand certain things, but now I'm getting invalid zip error while building live docker but not sure whether this is for everyone or me.

Screenshot 2022-06-08 at 8.16.43 PM.png


psiinon

unread,
Jun 8, 2022, 10:55:59 AM6/8/22
to OWASP ZAP Developer Group
Interesting.
Thats a 3rd party zip file.
If you dont need WebSwing then you could just remove it from your docker file.
I've downloaded it locally and it expanded ok for me :/

Note that you dont have to do it this way.
I think it would be easier to create a new docker image based on our live one and then just add your files to it.

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages