docker compose push

描述推送服务镜像
用法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推送时不打印进度信息
© . This site is unofficial and not affiliated with Kubernetes or Docker Inc.