mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add comment about Z flag for selinux
This commit is contained in:
parent
f0cf940cb5
commit
2e5b4fcf4c
1 changed files with 3 additions and 0 deletions
|
|
@ -82,6 +82,9 @@ def docker_cmd():
|
||||||
'docker', 'run',
|
'docker', 'run',
|
||||||
'--rm',
|
'--rm',
|
||||||
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
|
'-u', '{}:{}'.format(os.getuid(), os.getgid()),
|
||||||
|
# https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container-volumes-from
|
||||||
|
# The `Z` option tells Docker to label the content with a private
|
||||||
|
# unshared label. Only the current container can use a private volume.
|
||||||
'-v', '{}:/src:rw,Z'.format(os.getcwd()),
|
'-v', '{}:/src:rw,Z'.format(os.getcwd()),
|
||||||
'--workdir', '/src',
|
'--workdir', '/src',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue