There was an error while loading. Please reload this page.
1 parent f0cf940 commit 2e5b4fcCopy full SHA for 2e5b4fc
1 file changed
pre_commit/languages/docker.py
@@ -82,6 +82,9 @@ def docker_cmd():
82
'docker', 'run',
83
'--rm',
84
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
85
+ # 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
)
0 commit comments