Is there a way to hibernate in a docker container

I like to use the Jupyter Notebook. If I run it on a virtual machine in a virtual box, I can save the state of the virtual machine and then pick it up where I left the next day. Can I do something like this if I have to run it in a docker container? those. to reset the "state" of the container to disk, then fix it and reload the "state"?

+4
source share
3 answers

It looks like it docker checkpointmight be what I'm trying to accomplish here. In the documents that describe him, not so much. In fact, the docs docker checkpointsay “Checkpoint Management,” which is massive useless.

UPDATE: This is, in fact, what the docker breakpoint should do. When I check my jupyter laptop container, it saves it, I can start it with docker start --checkpoint [my_checkpoint] jupyter_notebook, and it shows that it works for me as being in state Running. However, attempts then to use laptops Runningdo not work. I'm not sure if this is a CRIU problem or a Jupyter problem, but I will cover this in the appropriate git problem tracking.

Anyhoo docker checkpoint - , VM-save-state/hibernate.

+3

, , - docker pause <container-id>

https://docs.docker.com/engine/reference/commandline/pause/

docker pause . Linux cgroups. SIGSTOP, . cgroups , .

VirtualBox , .

+3

, :

docker stop myjupyter
(hours pass)
docker start myjupyter
docker attach myjupyter

, , -.

0

Source: https://habr.com/ru/post/1681645/


All Articles