There are two ways to import and export docker containers:
One is to use the save and load commands
The usage example is as follows:
docker save ubuntu:load>/root/ubuntu.tar
docker load<ubuntu.tar
One is to use the export and import commands
The usage example is as follows:
docker export 98ca36> ubuntu.tar
cat ubuntu.tar | sudo docker import - ubuntu:import
Note that the two methods cannot be mixed.
If you use import to import the file generated by save, although the import does not prompt an error, it will prompt a failure when starting the container.
An error like "docker: Error response from daemon: Container command not found or does not exist" will appear.
Similarly, using load to load files generated by export will also cause problems.