From fdf441d99e7211a5d4604d8c0e61a75316107d82 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Mon, 10 Feb 2020 12:16:38 +0100 Subject: [PATCH] Added option --tag. --- ogscm/cli_args.py | 5 +++++ ogscm/container_info.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ogscm/cli_args.py b/ogscm/cli_args.py index 5d70bd4..54e99fb 100644 --- a/ogscm/cli_args.py +++ b/ogscm/cli_args.py @@ -92,6 +92,11 @@ class Cli_Args(argparse.ArgumentParser): default='registry.opengeosys.org/ogs/ogs', help='The docker registry the image is tagged and ' 'uploaded to.') + build_g.add_argument( + '--tag', + type=str, + default='', + help='The full docker image tag. Overwrites --registry.') build_g.add_argument('--convert', '-C', dest='convert', diff --git a/ogscm/container_info.py b/ogscm/container_info.py index ae0db9e..f9e865b 100644 --- a/ogscm/container_info.py +++ b/ogscm/container_info.py @@ -101,13 +101,13 @@ class container_info(): self.img_file += f'-cmake-{cmake_args_hash_short}' if args.gui: self.img_file += '-gui' - if args.docs: - self.img_file += '-docs' if ogs_version != 'off' and not args.runtime_only: self.img_file += '-dev' - docker_repo = self.img_file - self.tag = f"{args.registry}/{docker_repo}:latest" + if args.tag != '': + self.tag = args.tag + else: + self.tag = f"{args.registry}/{self.img_file}:latest" if os.path.isdir(ogs_version): self.ogsdir = True -- GitLab