Docker Community Forums

Share and learn in the Docker community.

Why docker-compose pull returns zero status code if no image is found on server?

So I have an app in which I use a docker compose setup with a base image,

    image: "${REPO}:base-${BASE_TAG}"
      context: .
      network: host
      dockerfile: docker/Dockerfile.base
          CI: $CI

when I do

$ docker-compose pull base
WARNING: The CI variable is not set. Defaulting to a blank string.
$ echo $?

But when I assemble docker image name myself and pull it with docker, it clearly fails:

$ docker pull  $REPO:base-$BASE_TAG
Error response from daemon: manifest for <repo>:880407b2b09f2ead1366571f332067364b8fabf9 not found: manifest unknown: manifest unknown
$ echo $?

So my question is why compose is suppressing the error?

This post was flagged by the community and is temporarily hidden.

Not exactly what I expected(asked about docker-compose pull), but a way to go, thanx

Care should be taken with answers from @lewish95; it seems it’s just some bot reposting plagiarized, unformatted and most often unrelated content, in this case taken from Using docker-compose with CI - how to deal with exit codes and daemonized linked containers? - Stack Overflow. Lacking moderation, folks are flagging their posts to hide them from future readers who may not understand they got the wrong advice.

See also Why does this forum feel so unmoderated?