From e778d047401253451abe7480a37f0f3a3c1aa224 Mon Sep 17 00:00:00 2001 From: Sam Ng Date: Thu, 1 Jan 2015 14:25:59 -0700 Subject: [PATCH] An extremely small 19.6 MB docker image for weed-fs --- Dockerfile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06d81ebf0..00b958046 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,21 @@ -FROM cydev/go -RUN go get github.com/chrislusf/weed-fs/go/weed +FROM progrium/busybox + +WORKDIR /opt/weed + +RUN opkg-install curl +RUN echo insecure >> ~/.curlrc + +RUN \ + curl -Lks https://bintray.com$(curl -Lk http://bintray.com/chrislusf/Weed-FS/seaweed/_latestVersion | grep linux_amd64.tar.gz | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp") | gunzip | tar -xf - -C /opt/weed/ && \ + mv weed_* bin && \ + chmod +x ./bin/weed + EXPOSE 8080 EXPOSE 9333 + VOLUME /data -ENTRYPOINT ["weed"] + +ENV WEED_HOME /opt/weed +ENV PATH ${PATH}:${WEED_HOME}/bin + +ENTRYPOINT ["weed"] \ No newline at end of file