We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下四步为 Docker 把容器打包成镜像并迁移到另外一台服务器上运行,
Docker
使用 docker commit 命令可以将现有的容器状态保存为新的镜像。这个过程类似于创建一个镜像的快照。
docker commit
假设您的容器名称是 your-container-name,您想要创建的新镜像名为 your-new-image-name。命令格式如下:
your-container-name
your-new-image-name
docker commit your-container-name your-new-image-name
docker save -o your-image-file.tar your-new-image-name
docker load -i your-image-file.tar
The text was updated successfully, but these errors were encountered:
No branches or pull requests
以下四步为
Docker
把容器打包成镜像并迁移到另外一台服务器上运行,1. 将容器 commit 为镜像
使用
docker commit
命令可以将现有的容器状态保存为新的镜像。这个过程类似于创建一个镜像的快照。假设您的容器名称是
your-container-name
,您想要创建的新镜像名为your-new-image-name
。命令格式如下:2. 将镜像保存为本地文件
3. 将本地镜像文件传输至远程服务器
4. 在服务器上执行 docker load
The text was updated successfully, but these errors were encountered: