diff --git a/debian/changelog b/debian/changelog
index 2b5c6120c4fce10cad60154d7e5700d71cabd5f0..bdd5c1c96d290cf3c53ce6aedd2d85ca288b49b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
kam-shipcat (0.9.1) unstable; urgency=medium
- * Added podman_create_options.
+ * Added podman_create_options and "shc update --no-pull".
-- Martin Mares <mj@ucw.cz> Tue, 18 Jun 2024 10:46:23 +0200
diff --git a/shipcat/main.py b/shipcat/main.py
index e29dd64b916e4def691911787791c89ce224de9c..1f46a8480743a4d3969c4ef4139855ae1747180f 100755
--- a/shipcat/main.py
+++ b/shipcat/main.py
@@ -192,10 +192,11 @@ def service_action(cc: ContainerConfig, action: str) -> None:
def cmd_update(args: argparse.Namespace) -> None:
cc = setup_container(args, False)
- progress('Pulling new image')
- run_command(
- ['podman', 'pull', cc.image]
- )
+ if not args.no_pull:
+ progress('Pulling new image')
+ run_command(
+ ['podman', 'pull', cc.image]
+ )
progress('Stopping container')
service_action(cc, 'stop')
@@ -440,6 +441,7 @@ def main() -> None:
update_parser = subparsers.add_parser('update', help='update a container from an image', description='Update a container from an image and start it.')
update_parser.add_argument('name', help='name of the container')
+ update_parser.add_argument('--no-pull', default=False, action='store_true', help='do not pull a new image')
args = parser.parse_args()
get_caller_credentials()