Skip to content

Commit

Permalink
Allow specifying registry with build-compose (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
La0 committed Apr 18, 2019
1 parent b47e9e3 commit b1c9ca4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions taskboot/build.py
Expand Up @@ -100,6 +100,8 @@ def build_compose(target, args):
context = os.path.realpath(os.path.join(root, build.get('context', '.')))
dockerfile = os.path.realpath(os.path.join(context, build.get('dockerfile', 'Dockerfile')))
tag = service.get('image', name)
if args.registry:
tag = '{}/{}'.format(args.registry, tag)
docker.build(context, dockerfile, tag)

# Write the produced image
Expand Down
1 change: 1 addition & 0 deletions taskboot/cli.py
Expand Up @@ -67,6 +67,7 @@ def main():
help='Path to docker-compose.yml to use',
default='docker-compose.yml',
)
compose.add_argument('--registry', type=str, help='Docker registry to use in images tags')
compose.add_argument('--write', type=str, help='Directory to write the docker images')
compose.set_defaults(func=build_compose)

Expand Down

0 comments on commit b1c9ca4

Please sign in to comment.