1111def test_editable (run_repo2docker ):
1212 """Run a local repository in edit mode. Verify a new file has been
1313 created afterwards"""
14+ argv = []
15+
16+ # https://github.com/jupyterhub/repo2docker/issues/1483
17+ docker_host = os .environ .get ("DOCKER_HOST" )
18+ if docker_host and docker_host .find ("podman" ) != - 1 :
19+ argv .extend (["--user-id" , "0" ])
20+
1421 newfile = os .path .join (DIR , "newfile" )
1522 try :
1623 # If the file didn't get properly cleaned up last time, we
1724 # need to do that now
1825 os .remove (newfile )
1926 except FileNotFoundError :
2027 pass
21- argv = ["--editable" , DIR , "/usr/local/bin/change.sh" ]
28+ print (f"DIR { DIR } " )
29+ argv .extend (["--editable" , DIR , "/usr/local/bin/change.sh" ])
2230 run_repo2docker (argv )
2331 try :
2432 with open (newfile ) as fp :
@@ -31,8 +39,14 @@ def test_editable(run_repo2docker):
3139def test_editable_by_host ():
3240 """Test whether a new file created by the host environment, is
3341 detected in the container"""
42+ argv = ["--editable" , DIR ]
43+
44+ # https://github.com/jupyterhub/repo2docker/issues/1483
45+ docker_host = os .environ .get ("DOCKER_HOST" )
46+ if docker_host and docker_host .find ("podman" ) != - 1 :
47+ argv .extend (["--user-id" , "0" ])
3448
35- app = make_r2d ([ "--editable" , DIR ] )
49+ app = make_r2d (argv )
3650 app .initialize ()
3751 app .build ()
3852 container = app .start_container ()
0 commit comments