dev_container: Add --pull option to force trigger docker pull

TEST=./tools/dev_container --pull triggers docker pull
BUG=b:243562713

Change-Id: I4158e433a62f6e7815edaec180b1b294d9ff4d87
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892524
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Zihan Chen 2022-09-09 00:38:09 +00:00 committed by crosvm LUCI
parent 94de30aea3
commit 7de274b8df

View file

@ -129,6 +129,7 @@ def main(
interactive: bool = False,
podman: bool = PODMAN_IS_DEFAULT,
self_test: bool = False,
pull: bool = False,
):
chdir(CROSVM_ROOT)
@ -159,6 +160,10 @@ def main(
if clean:
delete_container(docker)
if pull:
docker("pull", f"gcr.io/crosvm-infra/crosvm_dev:{IMAGE_VERSION}").fg()
return
# If a command is provided run non-interactive unless explicitly asked for.
tty_args = []
if not command or interactive: