2

I can suspend the processes running inside a container with the PAUSE command. Is it possible to clone the Docker container whilst paused, so that it can be resumed (i.e. via the UNPAUSE command) several times in parallel?

The use case for this is a process which takes long time to start (i.e. ~20 seconds). Given that I want to have a pool of short-living Docker containers running that process in parallel, I would reduce start-up time for each container a lot if this was somehow possible.

Roberto Aloi
  • 30,570
  • 21
  • 75
  • 112
  • I can imagine a whole bunch of use cases for this scenario, especially having backups of the container (in its memory state, opened applications and such) for testing, memory inspection and bug finding. – phil294 Dec 05 '17 at 23:40

2 Answers2

1

No, you can only clone the container's disk image, not any running processes.

Thilo
  • 257,207
  • 101
  • 511
  • 656
0

Yes, you can, using docker checkpoint (criu). This does not have anything to do with pause though, it is a seperate docker command.

Also see here.

phil294
  • 10,038
  • 8
  • 65
  • 98