docker compose 推送
| 描述 | 推送服务镜像 |
|---|---|
| 用法 | docker compose push [OPTIONS] [SERVICE...] |
描述
将服务的镜像推送到各自的注册表/仓库。
做出以下假设:
- 您正在推送本地构建的镜像
- 您拥有构建密钥的访问权限
示例
services:
service1:
build: .
image: localhost:5000/yourimage ## goes to local registry
service2:
build: .
image: your-dockerid/yourimage ## goes to your repository on Docker Hub选项
| 选项 | 默认 | 描述 |
|---|---|---|
--ignore-push-failures | 推送它能推送的内容,并忽略推送失败的镜像 | |
--include-deps | 同时推送声明为依赖项的服务镜像 | |
-q, --quiet | 推送时不打印进度信息 |