云游屋
扫描关注云游屋

云游屋

docker import 命令

云游屋2021-09-06Docker命令 921

该命令与 docker export命令相对,用于导入容器,导入后变成镜像。

语法

docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]

实例

从网络地址导入

docker import https://example.com/container.tar

从本地导入

docker import /path/to/exampleContainer.tgz

帮助

$ docker import --help

Usage:  docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]

Import the contents from a tarball to create a filesystem image

Options:
  -c, --change list       Apply Dockerfile instruction to the created image
  -m, --message string    Set commit message for imported image
      --platform string   Set platform if server is multi-platform capable


发表评论