docker-compose push

Usage: push [options] [SERVICE...]

Options:
    --ignore-push-failures  Push what it can and ignores images with push failures.

将服务图像推送到其各自的registry/repository

进行以下假设:

  • 您正在推送您在本地构建的图像

  • 您有权访问构建密钥

例子

version: '3'
services:
  service1:
    build: .
    image: localhost:5000/yourimage  # goes to local registry

  service2:
    build: .
    image: your-dockerid/yourimage  # goes to your repository on Docker Hub
无花果组成撰写码头工人编排cli