compose icon indicating copy to clipboard operation
compose copied to clipboard

Docker-compose pull returns exit code 0 and gives no feedback when it fails

Open arturozv opened this issue 11 years ago • 7 comments

Hi,

I was trying to pull some images from a private repository with a problem in .dockercfg and besides it was failing pull command always returns 0 and gives no feedback.

Normal output: Pulling someservice (company/someservice:latest)...

Output using --verbose

Pulling someservice (company/someservice:latest)...
docker pull <- (u'company/someservice:latest', insecure_registry=False)
docker pull -> u'{"status":"Pulling repository company/someservice"}\r\n{"errorDetail":{"message":"Error: image company/someservice:latest not found"},"error":"Error: image company/someservice:latest not found"}\r\n' 

arturozv avatar Mar 19 '15 15:03 arturozv

#dibs

aroxby avatar Mar 26 '15 23:03 aroxby

It's not clear to me what your issue is. Is docker-compose failing to pull a private image? Or is docker-compose failing to produce proper reasonable output when the image doesn't exist?

Can you post exactly what steps I could take to reproduce the error?

aroxby avatar Mar 27 '15 00:03 aroxby

If you don't want to post your private repo, maybe you can use samalba/docker-registry. I found it here http://www.activestate.com/blog/2014/01/deploying-your-own-private-docker-registry

aroxby avatar Mar 27 '15 00:03 aroxby

Docker-compose is failing to pull a private image from docker registry because credentials were not configured correctly (normal behaviour). The problem is the output of docker-compose pull. I would have to run it with --verbose and check the output to know if there has been an error.

arturozv avatar Mar 27 '15 08:03 arturozv

This was fixed a while ago. Pull errors are now correctly reported and have a non-zero exit status.

dnephin avatar Nov 27 '15 17:11 dnephin

Problem still occurs if parallel argument is used. If any of the pulls fail the $lastexitcode and $? report 0 and True respectively.

docker-compose version 1.14.0, build c7bdf9e3

aaronmorgan avatar Aug 09 '17 03:08 aaronmorgan

I am somehow getting the same with: docker-compose version 1.15.0, build e12f3b9

I can pull private images correctly, but when I try to pull a non-existent image, I get "No such service", but exit code is 0.

ericat avatar Aug 29 '17 16:08 ericat