docker 撰写推送

描述推送服务图片
用法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推送而不打印进度信息