criu/tests/run-podman-checkpoint-restore.sh
Petr Šabata 1745a49bbd RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/criu#f5835fc9be37013ad11a7e6f433cce21ca56ec97
2020-10-14 23:19:34 +02:00

33 lines
861 B
Bash
Executable File

#!/bin/bash
set -eux
ls -la
echo "Start container with tomcat"
podman --log-level debug run --tmpfs /tmp --tmpfs /usr/local/tomcat/logs -d docker://docker.io/yovfiatbeb/podman-criu-test
echo "See which containers are running"
podman ps
# tomcat needs some time to start up
echo "Wait 15 seconds for tomcat to start"
sleep 15
echo "Connect to tomcat in the container"
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8080/examples/servlets/servlet/HelloWorldExample -v
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'`:8080/examples/servlets/servlet/HelloWorldExample -v
ls -la
echo test