Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support {home} replacement on run-image #60

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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