Skip to content

Commit 79dcd31

Browse files
committed
WRP: Allow passing a network driver to Docker
1 parent f9b2f53 commit 79dcd31

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wrapper/fmriprep_docker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ def get_parser():
296296
help='Set custom environment variable within container')
297297
g_dev.add_argument('-u', '--user', action='store',
298298
help='Run container as a given user/uid')
299+
g_dev.add_argument('--network', action='store',
300+
help='Run container with a different network driver '
301+
'("none" to simulate no internet connection)')
299302

300303
return parser
301304

@@ -434,6 +437,9 @@ def main():
434437
if opts.shell:
435438
command.append('--entrypoint=bash')
436439

440+
if opts.network:
441+
command.append('--network=' + opts.network)
442+
437443
command.append(opts.image)
438444

439445
# Override help and version to describe underlying program

0 commit comments

Comments
 (0)