

Ask HN: How do you do Docker CI? - skyraider

I have a bunch of Docker containers all hooked up using docker-compose (previously fig). I have found that services that advertise themselves as &quot;Docker CI&quot; services are usually just talking about using Docker to run their build workers.<p>I would like a continuous integration service that preserves the Docker build cache between runs, instead of spinning up a completely new worker&#x2F;filesystem&#x2F;build context. Otherwise, builds take absolutely forever. Ideally managed (unlike https:&#x2F;&#x2F;github.com&#x2F;groupon&#x2F;DotCi, which doesn&#x27;t come with CircleCI&#x27;s ready-to-go per-build database).<p>The only thing I&#x27;ve found is TeamCity (old, you can&#x27;t version build tasks in a yaml file easily like you can with CircleCI, you have to maintain infrastructure, etc). Quay.io doesn&#x27;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&#x27;t spawn into an unbuilt container to debug things!).<p>How do you run continuous integration on your Docker container cluster?
======
jquast
I think TeamCity can achieve your needs: it has the ability to create a "build
chain", where dependent builds can specify "Build on same host as <docker
build>" and "Re-use existing (successful) build".

I do something similar by provisioning Joyent VM's as a dependency of a build
chain that requires a build to be run on those VM's.

The most recent TC release can persist your build configuration to VCS (say, a
private github proj.), so you do get some level of vcs-managed build
configuration.

------
wernerb
Drone [0] seems what you would like to use. Define all your containers as
service containers and create/define steps to test how those service
containers co-operate. Of course, you must test each service container
individually in separate drone builds.

[0]: [https://github.com/drone/drone](https://github.com/drone/drone)

