[CRIU] checkpoint xpra docker container

Matthieu Imbert matthieu.imbert at inria.fr
Mon Jun 8 16:31:00 MSK 2020


Hi,

I'm trying to checkpoint a docker container running an xpra [1] server, 
which runs an x11 app (i'm currently testing with xcalc).

My goal is to be able to checkpoint (and stop) the container, then 
restart it later, and connect (through xpra) to the x11 app in the same 
state as it was at the time of the checkpoint.

I understand that doing that directly with the x11 app is not possible 
because there is part of the state which is inside the x11 server, thus 
not accessible to criu, this is why I think that embedding everything in 
a docker container with xpra might be the solution, because everything 
is inside the container, so we may reasonably expect that all relevant 
state will be saved with a docker checkpoint.

For now, i'm able to checkpoint the container without error, and restart 
the container from the checkpoint, but when the container is restarted, 
xpra restarts from scratch (at least, this is what it looks like, when 
looking at the container logs) and the x11 app is restarted as well, and 
thus looses its state.

Do you have an idea of what goes wrong here, and is there a way to fix it?

Here are the details of my test:

The Dockerfile:

FROM debian:buster
ENV DEBIAN_FRONTEND=noninteractive
ENV APT="apt-get -q -y"
RUN ${APT} update && ${APT} dist-upgrade
RUN ${APT} install xpra xvfb procps x11-apps
RUN ${APT} clean && rm -rf /var/lib/apt/lists
RUN mkdir -p /run/user/0/
CMD xpra --speaker=no --dbus-launch=no --dbus-control=no 
--notifications=no --mdns=no --webcam=no --html=off --daemon=no start 
--bind-tcp=0.0.0.0:16661 --env=GDK_DPI_SCALE=1 --exit-with-children 
--start-child="xcalc"



Cheers,

--

[1] - https://xpra.org/

-- 
Matthieu Imbert



More information about the CRIU mailing list