Update: I have not been able to get the dockerfile under 400mb using golang:1.6.2-alpine w/building in the dockerfile.
# Dockerfile for DGraph
FROM golang:1.6.2-alpine
MAINTAINER Manish Jain <manishrjain@gmail.com>
ENV DGRAPH github.com/dgraph-io/dgraph
COPY . $GOPATH/src/$DGRAPH
RUN mkdir -p $GOPATH/src/$DGRAPH && \
mkdir /dgraph && mkdir /data && \
sed -i -e 's/v3\.3/edge/g' /etc/apk/repositories; \
echo 'http://dl-4.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
echo 'http://dl-4.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories && \
echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
apk update; \
apk add rocksdb rocksdb-dev build-base
RUN go build -v $DGRAPH/... && \
go test $DGRAPH/... && echo "v0.2.3" && \
apk del rocksdb-dev build-base go && rm -rf /var/cache/apk/*
^ That’s the last version I was playing with after deciding to just use the rocksdb-dev repo instead of building manually and applying patches.
It’s too much effort for me rn. I’ll have to wait until the weekend. I’ll open a PR though