Mount Volume INSIDE Container

Viewed 102

I'm working in CI.

I'm using a copy of an Image, to run some security tests. This tool, which is installed in this Docker Image, requires to mount volume to save the reports.

So once i start from the CI the image, i can check the results directly in the pipeline, but i can not save them since i would need a volume. From the documentation:

docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-full-scan.py \ -t https://www.example.com -g gen.conf -r testreport.html

Now the point is that, i can not mount the volume inside the gitlab-ci (if i would like to do this in the exixting enviroment i would need to put up a new runner which mounts a volume for my image)

The question is, is there no other way to get the results in CI, or in another words, to mount the volume INSIDE the container itselfs and not when im starting it? If no, do you have any suggestions on how i can overcome this problem without creating a new runner?

Thank you very much!

Cheers

0 Answers
Related