2023-02-20 06:57:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-06-29 12:29:15 +00:00
|
|
|
# crun is not built with checkpoint/restore support
|
|
|
|
exit 0
|
|
|
|
|
2023-02-20 06:57:27 +00:00
|
|
|
set -eux
|
|
|
|
|
|
|
|
ls -la
|
|
|
|
|
|
|
|
echo "Start container"
|
|
|
|
podman --log-level debug run -d quay.io/adrianreber/counter
|
|
|
|
|
|
|
|
echo "See which containers are running"
|
|
|
|
podman ps
|
|
|
|
|
|
|
|
echo "Connect to the container"
|
|
|
|
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
|
|
|
|
|
|
|
|
echo "Checkpoint container"
|
|
|
|
podman --log-level debug container checkpoint -l
|
|
|
|
|
|
|
|
podman ps -a
|
|
|
|
echo "Restore container"
|
|
|
|
podman --log-level debug container restore -l
|
|
|
|
|
|
|
|
podman ps -a
|
|
|
|
echo "Check if we can connect to the restored container"
|
|
|
|
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
|
|
|
|
|
|
|
|
ls -la
|