Skip to content

Commit

Permalink
Container ID extraction safer
Browse files Browse the repository at this point in the history
Podman remove the --latest -l option from their ps call.
Reverting of using just -n 1 for the latest created container.
  • Loading branch information
markaltmann authored Nov 20, 2024
1 parent 4cc2c48 commit 046d713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vackup
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ cmd_save() {
error 'Failed to start busybox container'
fi

CONTAINER_ID=$("$CONTAINER" ps -lq)
CONTAINER_ID=$("$CONTAINER" ps -n 1 -q)

"$CONTAINER" commit -m "saving volume $VOLUME_NAME to /volume-data" "$CONTAINER_ID" "$IMAGE_NAME"

Expand Down

0 comments on commit 046d713

Please sign in to comment.