5 ms·
Would you mind sharing more details about the Docker setup on AWS? "Our code deployment flow was straightforward, and mostly consisted of building a Docker ima
by istvan__ 12y ago
Would you mind sharing more details about the Docker setup on AWS?
"Our code deployment flow was straightforward, and mostly consisted of building a Docker image off our latest codebase and distributing it to our server instances, with the help of a Docker image server. We only needed to write a few short Chef scripts to download the latest Docker image build and start up a new Docker container."
I was wondering what did you mean downloading the latest Dockerfile and build the image, or what sort of building are you performing with an image if it was not an accident? The diagram suggest a slightly different setup.
I my mind, you build your docker images on the CI/CB system and push them to a repository, than you can deploy them with docker pull. I was wondering if you used the docker-registry service or went for Docker Hub? I finished migrating some of our stuff to AWS/Docker last week but we skipped Opsworks part. I am familiar with Chef though, I just think it is overly complicated and it is hard to debug if something goes sideways.
Anyways, thanks for sharing.
- toomuchtodo 12y agoStore your Dockerfile in version control, either in its own repo with other Docker files or in the same repo as the app. 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!
- andrewstellar 12y agoGreat, thank you!
- alvinchow86 12y agoYup, pretty much. 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)
- Gigablah 12y agoI actually trust Docker Hub more compared to a private registry setup... had so many hard to debug EOF errors, registry container crashes, etc. 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.
- toomuchtodo 12y agoWe use private registry instances behind an ELB, with the containers stored in S3. When production counts on the registry being available, you've got to ensure reliability of the service and durability of the underlying container data.