Skip to content

Commit

Permalink
Support {home} replacement on run-image (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
rappdw committed Aug 20, 2019
1 parent 18fb789 commit 6905ea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -158,7 +158,8 @@ variable replacement designations of the form `{var}`. The supported variables

* `project_root` - will be replaced with the root directory name of the project
* `user` - will be replaced with the user name of the user running the command
* `project` - replace with project namge
* `project` - will be replaced with project name
* `home` - will be replaced with the user's home directory

### Image Push Replacement Variables

Expand Down
3 changes: 2 additions & 1 deletion scripts/run-image
Expand Up @@ -60,7 +60,8 @@ def run(mode, image_name, image_tag, **kwargs):
volumes = kwargs['volumes'].format(
project_root=get_root_dir(),
user=user,
project=os.path.split(get_root_dir())[1]
project=os.path.split(get_root_dir())[1],
home=os.path.expanduser("~")
)
volumes = os.path.expandvars(volumes)

Expand Down

0 comments on commit 6905ea9

Please sign in to comment.