diff --git a/reana/reana_dev/docker.py b/reana/reana_dev/docker.py index 65aa0e09..e567344e 100644 --- a/reana/reana_dev/docker.py +++ b/reana/reana_dev/docker.py @@ -259,8 +259,11 @@ def docker_rmi(user, tag, component): # noqa: D301 default=["CLUSTER"], help="Which components? [name|CLUSTER]", ) +@click.option( + "--registry", "-r", default="docker.io", help="Registry to use in the image tag" +) @docker_commands.command(name="docker-push") -def docker_push(user, tag, component): # noqa: D301 +def docker_push(user, tag, component, registry): # noqa: D301 """Push REANA component images to DockerHub. \b @@ -293,7 +296,7 @@ def docker_push(user, tag, component): # noqa: D301 if is_component_dockerised(component): if tag == "auto": component_tag = get_docker_tag(component) - cmd = "docker push {0}/{1}:{2}".format(user, component, component_tag) + cmd = f"docker push {registry}/{user}/{component}:{component_tag}" run_command(cmd, component) else: msg = "Ignoring this component that does not contain" " a Dockerfile."