Hacker News new | ask | show | jobs
by whalesalad 4015 days ago
I'm interested in hearing more about how you use this in terms of development lifecycle. Does a container image get created for every release of your app? I've always wondered about the more correct approach to this.

This is how I currently use Docker:

1) Custom base image with all the things my company needs like supervisord, libpq, etc..

2) Custom per-service base images like ones with Java for our Clojure services or Python for our research services which are built off of the base.

3) A release consists of pulling the latest version of the base image, example, acme-python, and then injecting the latest project code into it.

My concern here essentially boils down to the image repo. Github needs to add container storage because while I admire Docker Hub's efforts, I don't trust it.

2 comments

We have a setup that has been working out well for us:

1. We build docker images on every commit, in CI, and tag it with the git commit sha and branch (we don't actually use the branch tag anywhere, but we still tag it). This is essentially our "build" phase in the 12factor build/release/run. Every git commit has an associated docker image.

2. Our tooling for deploying is heavily based around the GitHub Deployments API. We have a project called Tugboat (https://github.com/remind101/tugboat) that receives deployment requests and fulfills them using the "/deploys" API of Empire. Tugboat simply deploys a docker image matching the GitHub repo, tagged with the git commit sha that is being requested for deployment (e.g. "remind101/acme-inc:<git sha>").

We originally started maintaining our own base images based on alpine, but it ended up not being worth the effort. Now, we just use the official base images for each language we use (Mostly Go, Ruby and Node here). We only run a single process inside each container. We treat our docker images much like portable Go binaries.

Why not just add a Dockerfile to your git repo and add a `docker build` step to your deploy?