This commit is contained in:
@@ -1,6 +1,36 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# Docker镜像批量打包
|
||||
# Docker镜像打包
|
||||
|
||||
## 默认打包
|
||||
|
||||
1. 打包
|
||||
|
||||
```bash
|
||||
docker save -o image.tar nginx:latest
|
||||
```
|
||||
|
||||
2. 导入
|
||||
|
||||
```bash
|
||||
docker load -i image.tar
|
||||
```
|
||||
|
||||
## 打包并压缩
|
||||
|
||||
1. 打包并压缩
|
||||
|
||||
```bash
|
||||
docker save nginx:latest | gzip -c > image.tar.gz
|
||||
```
|
||||
|
||||
2. 解压并导入
|
||||
|
||||
```bash
|
||||
gunzip -c image.tar.gz | docker load
|
||||
```
|
||||
|
||||
## 批量打包
|
||||
|
||||
- 第一种
|
||||
|
||||
Reference in New Issue
Block a user