mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-11-03 11:48:17 +00:00
Merge pull request #42 from jnealtowns/master
Mount the current working directory in addition to $HOME by default.
This commit is contained in:
@@ -96,6 +96,10 @@ ap.add_argument("--volumes",
|
||||
metavar='DIRECTORY',
|
||||
default=[])
|
||||
|
||||
ap.add_argument("--no-mount-current",
|
||||
help="Do not mount the current working directory. The default is the current working directory and $HOME",
|
||||
action='store_true')
|
||||
|
||||
ap.add_argument("--autobuild",
|
||||
help="Automatic build in isolation mode.",
|
||||
action='store_true')
|
||||
@@ -159,6 +163,11 @@ if ops.exec_:
|
||||
else:
|
||||
|
||||
ops.volumes += [ '/lib/modules' ]
|
||||
|
||||
if not ops.no_mount_current:
|
||||
# Add the current working directory to the volume list.
|
||||
ops.volumes.append(os.getcwd())
|
||||
|
||||
g_arg_d['volume_options'] = " ".join( [ " -v %s:%s " % (v, v) for v in ops.volumes ] )
|
||||
|
||||
g_docker_arguments = "docker run --privileged %(interactive)s -t -e DOCKER_IMAGE=%(image)s --name %(name)s %(ssh_options)s %(volume_options)s " % g_arg_d
|
||||
|
||||
Reference in New Issue
Block a user