Skip to content

Commit

Permalink
docker-push: add image-name option
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonadoni committed Oct 25, 2023
1 parent e05c55e commit aa52593
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reana/reana_dev/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ def docker_rmi(user, tag, component): # noqa: D301
@click.option(
"--registry", "-r", default="docker.io", help="Registry to use in the image tag"
)
@click.option("--image-name", help="Does the local image have a custom name?")
@docker_commands.command(name="docker-push")
def docker_push(user, tag, component, registry): # noqa: D301
def docker_push(user, tag, component, registry, image_name): # noqa: D301
"""Push REANA component images to DockerHub.
\b
Expand Down Expand Up @@ -294,7 +295,7 @@ def docker_push(user, tag, component, registry): # noqa: D301
if is_component_dockerised(component):
if tag == "auto":
component_tag = get_docker_tag(component)
cmd = f"docker push {registry}/{user}/{component}:{component_tag}"
cmd = f"docker push {registry}/{user}/{image_name or component}:{component_tag}"
run_command(cmd, component)
else:
msg = "Ignoring this component that does not contain" " a Dockerfile."
Expand Down

0 comments on commit aa52593

Please sign in to comment.