How to migrate the whole docker (include images and containers) to another host

I wanna copy my images and containers to another host/machine,keeping all data like imageid and containerid

how to do it?

thanks

Check the folder /var/lib/docker - It looks like that’s what you need.

If you don’t need live migration, that means migrate the container to another host while it is running, you can just copy the docker root directory to another host, defaultly /var/lib/docker.
If you want to do live migration, that’s a tough task.