docker compose push
is used to push service images defined in compose.yaml file to their respective registry/repository.
$ docker compose push [options] [SERVICE...]
Here,
OPTIONS:
--ignore-push-failures
→ Push what it can and ignores images with push failuresservices:
app1:
build: .
image: localhost:5000/yourimage
services:
app2:
build: .
image: your-dockerid/yourimage
services:
app1:
build: .
image: localhost:5000/yourimage ## goes to local registry
app2:
build: .
image: your-dockerid/yourimage ## goes to your repository on Docker Hub