Skip to content

Commit

Permalink
set docker grype db cache dir to tmp mount
Browse files Browse the repository at this point in the history
  • Loading branch information
robberwick committed Jul 31, 2024
1 parent 804a304 commit b2e69cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pygrype/core/backends/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ def executable_string(self) -> str:
return DOCKER_EXE

def execute(self, *args) -> CompletedProcess:
docker_args = ['run', '--rm', self.docker_image] + list(args)
docker_args = ['run', '--rm', '-e', 'GRYPE_DB_CACHE_DIR=/var/tmp/', '-v',
'/var/run/docker.sock:/var/run/docker.sock', '-v', '/var/tmp/grype_cache:/var/tmp/',
self.docker_image] + list(args)

return execute(self.executable_string, *docker_args)

0 comments on commit b2e69cd

Please sign in to comment.