工作中用到的,记录一下:

1. docker container/image transfer:

- docker export (without history)/save (with history) > {imageName}.tar

When using export, the image history (version) cannot be exported. The imported image will have no history info.

When using save, the image history will also be saved. Then, loading the image will include history info.

- docker import/load < {imageName}.tar


2. rename docker image - for name/tag is none:

Some times, the imported/loaded image will contain no name and tag, for best practice, we will need to have a image name and tag, just issuing the following command.

docker tag {imageID} {repository}:{tag}
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐