I have a bunch of Docker containers all hooked up using docker-compose (previously fig). I have found that services that advertise themselves as "Docker CI" services are usually just talking about using Docker to run their build workers.
I would like a continuous integration service that preserves the Docker build cache between runs, instead of spinning up a completely new worker/filesystem/build context. Otherwise, builds take absolutely forever. Ideally managed (unlike https://github.com/groupon/DotCi, which doesn't come with CircleCI's ready-to-go per-build database).
The only thing I've found is TeamCity (old, you can't version build tasks in a yaml file easily like you can with CircleCI, you have to maintain infrastructure, etc). Quay.io doesn't provision a database like CircleCI and Travis do, so you have to bifurcate dev and prod and install one inside the container and run unit tests during the container build (ew - you can't spawn into an unbuilt container to debug things!).
How do you run continuous integration on your Docker container cluster?
Docker's build-cache is a handy feature. It speeds up Docker builds due to reusing previously created layers. You can use the --no-cache option to disable caching or use a custom Docker build argument to enforce rebuilding from a certain step.
Still the bottom line is: Jenkins does not cache automagically for you. Caching is inside the scope of the build tool(s) that you are using. You have to take care to incorporate that properly to your CI environment's needs.
Travis CI builds can run and build Docker images, and can also push images to Docker repositories or other remote storage.
How to implement a CI/CD pipeline in the codebase using a CircleCI config file in the project. Building a Docker image. Pushing the Docker image to Docker Hub. Kicking off a deployment script which will run the application in Docker container on a Digital Ocean server.
CircleCI lets you build Docker containers as part of your build: https://circleci.com/integrations/docker
You are however right that this doesn't cache the Docker images - it's a bit tricky on our stack to do that right, but we are planning on addressing that soon.
In the meantime, a number of customers have cached it using CircleCI's built-in (non-Docker) caching, by using docker save
/docker load
: https://circleci.com/docs/docker#caching-docker-layers. It's not ideal, but it should tide you over until we're able to support this a lot better.
CircleCI 2.0 is Docker-centric. You can build Docker images, utilize layer caching, use Docker Compose, and even use official and custom Docker images as your build environment.
I'm currently using CircleCI, see http://tschottdorf.github.io/cockroach-docker-circleci-continuous-integration for a good guide to use the docker cache
shippable is also worth checking out, as their entire infrastructure is based around docker and orchestrating multiple docker containers with shippable formations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With