Sorry, those steps weren't accurate. Closing the local running instance of Zap would close Firefox.
The last thing I tried was this:
Run zap.sh locally
Once ZAP opens, click on the little Firefox icon at the top.
Firefox opens.
Attempt to test webapp == everything works fine.
look at the command line that Zap uses to open Firefox to discover where that special profile is being created/stored.
Copy that profile folder to a new location.
close firefox and zap.
run firefox myself, using a copy of that specially crafted profile folder:
/usr/lib/firefox/firefox -marionette -foreground -no-remote -profile ~/zap_profile
start the docker version of zap:
sudo docker run -u zap -p 8080:8090 -p 8090:8080 -i owasp/zap2docker-weekly zap-webswing.sh
Web app testing fails due to cert warnings.
I'll just follow your instructions and import the CA cert. :)