Vendoring dependencies for dgraph

I think there are numerous considerations here including those associated with the test-deploy cycle and mitigating the risk of occurrence of issues like the above. However, the most immediate benefit to me would be that this pattern naturally limits container size.

The current size of the dgraph/dgraph container is 1.6GB whereas the current size of dancompton/dgraph is 48mb.

Termie from wercker wrote a pretty decent article about Dockerfile anti-patterns, build-test, and minimal containers http://blog.wercker.com/2015/07/28/Dockerfiles-considered-harmful.html that describes wercker’s philosophy.

I put together a branch and build-container to demonstrate this last night:

branch: Adds makefile that uses build-container · dgraph-io/dgraph@eb47a68 · GitHub

build-container: https://github.com/dan-compton/build-go

In theory you should be able to clone my build repo (to $GOPATH/src/github.com/dgraph-io/dgraph, unfortunately), run make, and have a dgraph container so long as you have docker installed on your host

Big Edit: I accidentally wiped out my addition of the rockdb dependencies in the Dockerfile, so this will not work until I add back.

Edit2: fixed

2 Likes