We have automated image builds in Docker Hub and we also have automated image builds in Docker Cloud. Does it make sense to have both configured or should we only have one of the two? If only one, will Docker Cloud with autoredeploy=true know when Docker Hub finishes building a new image?
Docker Cloud will know when Docker Hub finishes building a new image and will work as expected with
autoredeploy=true. I use this pattern for several of our Node.js services.
Thanks Michael - I’ll disable our Docker Cloud builds for now then.
Good luck and please do report back to let us know how it worked out.
Some feedback on this process; I’m not 100% sure that autodeploy or our build process is working correctly. I have our development branch set to autobuild and I can see that it does in fact execute (I also see the success marker from Bitbucket where we’re linked).
In our Docker Cloud stack/services, I see the service is redeployed approximately the same time as the build finishes so this seems like everything is working. Right now our stack is just one instance each of nginx, our app server + code, redis, activemq and we use RDS as the database backer.
However, when we push changes and the container is redeployed, it does not seem to be pulling down the latest version of the image. I don’t know how else to describe it except that “redeploy” but automatic and manual seems to be like a
docker-compose restart app instead of a
--force-recreate. As a result, changes aren’t getting into the stack.
The only way I’ve found around this is to terminate the container or service, but terminating the service actually removes the configuration from our stack definition! So I am now copying it, terminating, pasting it back in, then redeploying.
Let me know if I am misunderstanding the workflow or if the redeploy should be getting the latest image and recreating the container. Thanks!