-
Notifications
You must be signed in to change notification settings - Fork 17
Description
My dev machine is an Apple silicon (M3) MacBook, so I'm trying to get this example to work by building a Docker image and running it in Docker Desktop.
Just running the commands in the README without any changes, I can build the initial image:
docker build -f Dockerfile.checkpoint -t example-spring-boot-checkpoint .
But running
docker run -d -v $(pwd)/target/cr:/cr --cap-add=CHECKPOINT_RESTORE --cap-add=SYS_PTRACE -p 8080:8080 --name example-spring-boot-checkpoint example-spring-boot-checkpoint
the container immediately exists with this error in the log:
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
At that point I'm over my head. Some googling found a mention of the same error, not in the context of Java or CRaC, that suggested using --platform linux/amd64
in the docker build
command. So, grasping at straws, I try with this build command:
docker build -f Dockerfile.checkpoint --platform linux/amd64 -t example-spring-boot-checkpoint .
Run again and now the Spring app starts up. But when I initiate the checkpoint using
docker exec -it example-spring-boot-checkpoint jcmd example-spring-boot JDK.checkpoint
it fails with this error:
2025-09-17T19:46:46.734Z INFO 130 --- [Attach Listener] jdk.crac : Starting checkpoint
CRIU failed with exit code 1 - check /cr/dump4.log
Command: /usr/share/zulu22.32.17-ca-crac-jdk22.0.2-linux_x64/lib/criu dump -t 130 -D /cr --shell-job -v4 -o dump4.log
The contents of dump4.log is:
(00.000555) Version: 3.17.1-crac (gitid b20-20-g2dc0a51+1)
(00.000936) Running on 5d3b541ec4c0 Linux 6.10.14-linuxkit #1 SMP Wed Sep 3 15:35:15 UTC 2025 x86_64
(00.001062) File /run/criu.kdat does not exist
(00.001422) Pagemap provides flags only
(00.002731) Error (criu/kerndat.c:215): Can't stat self map_files 2: No such file or directory
(00.003134) Error (criu/kerndat.c:1546): kerndat_get_shmemdev failed when initializing kerndat.
(00.003541) Adjust mmap_min_addr 0x8000 -> 0x10000
(00.003618) Found mmap_min_addr 0x10000
(00.003751) files stat: fs/nr_open 1048576
(00.003796) Error (criu/crtools.c:260): Could not initialize kernel features detection.
I'm no Docker or linux expert and this is all over my head. I recognize that this is somehow related to some mismatch or incompatibility between the Zulu JDK and the host OS, but that's all.
Has anyone successfully used this example on a Mac running Docker Desktop?
Thanks in advance.