We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b10ef4 + 2e5b4fc commit 61aa43dCopy full SHA for 61aa43d
1 file changed
pre_commit/languages/docker.py
@@ -82,7 +82,10 @@ def docker_cmd():
82
'docker', 'run',
83
'--rm',
84
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
85
- '-v', '{}:/src:rw'.format(os.getcwd()),
+ # https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container-volumes-from
86
+ # The `Z` option tells Docker to label the content with a private
87
+ # unshared label. Only the current container can use a private volume.
88
+ '-v', '{}:/src:rw,Z'.format(os.getcwd()),
89
'--workdir', '/src',
90
)
91
0 commit comments