summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-11-16 17:48:35 +0100
committerChristian Poessinger <christian@poessinger.com>2022-11-16 17:48:42 +0100
commita679b2da9543ad1d071a43caf9f646fbb2857c49 (patch)
tree1c1178fe2b633b7be024ed432880393691245bcb
parent00639f6c84457eff08760dcdd66b654eb39629d1 (diff)
downloadvyos-1x-a679b2da9543ad1d071a43caf9f646fbb2857c49.tar.gz
vyos-1x-a679b2da9543ad1d071a43caf9f646fbb2857c49.zip
containers: T2216: support re-install via dpkg of vyos-1x-smoketest package
skopeo does not support overwriting an image - simply remove and readd it.
-rwxr-xr-xdebian/vyos-1x-smoketest.postinst8
1 files changed, 6 insertions, 2 deletions
diff --git a/debian/vyos-1x-smoketest.postinst b/debian/vyos-1x-smoketest.postinst
index b33376bc3..18612804c 100755
--- a/debian/vyos-1x-smoketest.postinst
+++ b/debian/vyos-1x-smoketest.postinst
@@ -1,6 +1,10 @@
#!/bin/sh -e
BUSYBOX_TAG="docker.io/library/busybox:stable"
-OUTPUT_PATH="docker-archive://usr/share/vyos/busybox-stable.tar"
+OUTPUT_PATH="/usr/share/vyos/busybox-stable.tar"
-skopeo copy --additional-tag "$BUSYBOX_TAG" "docker://$BUSYBOX_TAG" "$OUTPUT_PATH"
+if [[ -f $OUTPUT_PATH ]]; then
+ rm -f $OUTPUT_PATH
+fi
+
+skopeo copy --additional-tag "$BUSYBOX_TAG" "docker://$BUSYBOX_TAG" "docker-archive:/$OUTPUT_PATH"