Skip to content
Snippets Groups Projects
Commit b94dd3fa authored by nimrod's avatar nimrod
Browse files

Small fix for update-wb.

In case the image or the toolbox container aren't present, download the
image and then return that the image isn't the latest (causing a new
container to be created).
parent 619ea42d
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,12 @@ IMAGE='registry.shore.co.il/workbench'
CONTAINER='workbench'
is_latest() {
podman image exists "$IMAGE" || return 1
toolbox run --container "$CONTAINER" true 2>/dev/null || return 1
if ! podman image exists "$IMAGE" ||
! toolbox run --container "$CONTAINER" true 2>/dev/null
then
podman image pull "$IMAGE" || exit 1
return 1
fi
current="$(podman container inspect "$CONTAINER" --format '{{ .Image }}')"
podman image pull "$IMAGE" > /dev/null
new="$(podman image inspect "$IMAGE" --format '{{.Digest}}')"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment