mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-26 03:35:31 +00:00
Remove blank lines after code block markers
This commit is contained in:
@@ -11,7 +11,6 @@ CONTAINER ID IMAGE COMMAND CREATED
|
||||
7691a814370e ubuntu:24.04 "/bin/bash" 36 hours ago Exited (0) 21 hours ago test
|
||||
$ docker export 7691a814370e > ubuntu.tar
|
||||
```
|
||||
|
||||
这样将导出容器快照到本地文件。
|
||||
|
||||
### 5.5.2 导入容器快照
|
||||
@@ -24,11 +23,9 @@ $ docker image ls
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
test/ubuntu v1.0 9d37a6082e97 About a minute ago 171.3 MB
|
||||
```
|
||||
|
||||
此外,也可以通过指定 URL 或者某个目录来导入,例如
|
||||
|
||||
```bash
|
||||
$ docker import http://example.com/exampleimage.tgz example/imagerepo
|
||||
```
|
||||
|
||||
*注:用户既可以使用 `docker load` 来导入镜像存储文件到本地镜像库,也可以使用 `docker import` 来导入一个容器快照到本地镜像库。这两者的区别在于容器快照文件将丢弃所有的历史记录和元数据信息 (即仅保存容器当时的快照状态),而镜像存储文件将保存完整记录,体积也要大。此外,从容器快照文件导入时可以重新指定标签等元数据信息。*
|
||||
|
||||
Reference in New Issue
Block a user