Add an edit-mode option
This adds an option to run from a local repository in edit mode, where
changes in a running Docker container (for example, through a
notebook) are reflected in the local repository.
Implements the feature suggested in
MODIFY
repo2docker/app.py
repo2docker/app.py
@@ -342,6 +342,13 @@ class Repo2Docker(Application):
default=[]
)
+ argparser.add_argument(
+ '--editable', '-E',
+ dest='editable',
+ action='store_true',
+ help='Use the local repository in edit mode',
+ )
+
argparser.add_argument(
'--appendix',
type=str,
@@ -392,6 +399,8 @@ class Repo2Docker(Application):
self.repo = args.repo
self.ref = None
self.cleanup_checkout = False
+ if args.editable:
+ self.volumes[os.path.abspath(args.repo)] = '.'
else:
self.repo_type = 'remote'
self.repo = args.repo

Add an edit-mode option

This adds an option to run from a local repository in edit mode, where
changes in a running Docker container (for example, through a
notebook) are reflected in the local repository.

Implements the feature suggested in #357