File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,18 +76,18 @@ def install_environment(
7676 os .mkdir (directory )
7777
7878
79- def get_docker_user () -> str : # pragma: win32 no cover
79+ def get_docker_user () -> Tuple [ str , ...] : # pragma: win32 no cover
8080 try :
81- return f'{ os .getuid ()} :{ os .getgid ()} '
81+ return ( '-u' , f'{ os .getuid ()} :{ os .getgid ()} ' )
8282 except AttributeError :
83- return '1000:1000'
83+ return ()
8484
8585
8686def docker_cmd () -> Tuple [str , ...]: # pragma: win32 no cover
8787 return (
8888 'docker' , 'run' ,
8989 '--rm' ,
90- '-u' , get_docker_user (),
90+ * get_docker_user (),
9191 # https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container-volumes-from
9292 # The `Z` option tells Docker to label the content with a private
9393 # unshared label. Only the current container can use a private volume.
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ def invalid_attribute():
2020 getuid = invalid_attribute ,
2121 getgid = invalid_attribute ,
2222 ):
23- assert docker .get_docker_user () == '1000:1000'
23+ assert docker .get_docker_user () == ()
You can’t perform that action at this time.
0 commit comments