by toomuchtodo · 11y ago · 0 comments
Use Jenkins (or preferred build system) to fetch the Dockerfile, your app, build the Docker container, and then docker push to your own private docker registry.
Bake your AMIs with your Docker image (tags are your friend). You don't want to have to scale and find out you're having problems fetching Docker images from your private registry. You'll still be using config management for the underlying Docker host.
Hope this helps!
We actually were using Docker Hub but they went down a few times so we are going to try setting up a private registry. We also tried Docker Hub's "Automated Build" service but it doesn't do any layer caching between builds so we found it way too slow.
One thing I'd recommend is at least installing the Docker service itself on the AMI (spinning up EC2 instances, especially on Opsworks, is slow enough as is)
But the Docker Hub is also a single point of failure, so now I'm considering just having our CI service dump (docker save) the container build to a tarfile and send it to S3, then having the destination host download it and run docker load.
Docker's handling of layers is excruciatingly slow, anyway.