From 2fc86ffea674d7250ec40d9a418c8b4a0a5d679f Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Mon, 23 Mar 2020 19:13:49 +0100 Subject: [PATCH] dev_cli: Always pull the latest container image Signed-off-by: Samuel Ortiz --- scripts/dev_cli.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 49cd3f503..ae8a03b89 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -113,6 +113,13 @@ ensure_build_dir() { done } +# Make sure we're using the latest dev container, by just pulling it. +ensure_latest_ctr() { + $DOCKER_RUNTIME pull "$CTR_IMAGE" + + ok_or_die "Error pulling container image. Aborting." +} + # Fix main directory permissions after a container ran as root. # Since the container ran as root, any files it creates will be owned by root. # This fixes that by recursively changing the ownership of /cloud-hypervisor to the @@ -325,5 +332,6 @@ cmd=cmd_$1 shift ensure_build_dir +ensure_latest_ctr $cmd "$@"