From: Brian Warner Date: Mon, 15 Jun 2015 21:40:19 +0000 (-0700) Subject: Dockerfile: git-pull more history, to get a version string X-Git-Tag: allmydata-tahoe-1.10.1~2 X-Git-Url: https://git.rkrishnan.org/components/%22news.html/simplejson/about.html?a=commitdiff_plain;h=f26423cb4d264dffcc2ee5937b87c015f16a61e4;p=tahoe-lafs%2Ftahoe-lafs.git Dockerfile: git-pull more history, to get a version string The Docker build process seems to use 'git pull --depth=1', which doesn't fetch enough history to see a tag, which means tahoe's setup.py can't compute a version (then 'tahoe --version' reports "unknown"). Pulling a hundred commits should be enough to see a tag without making the resulting image unnecessarily large. If we go more than 100 commits between tags, we'll need to increase this, or come up with something smarter. --- diff --git a/Dockerfile b/Dockerfile index 6b45619b..0e6ac043 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM python:2.7 ADD . /tahoe-lafs RUN \ cd /tahoe-lafs && \ + git pull --depth=100 && \ make && \ ln -vs /tahoe-lafs/bin/tahoe /usr/local/bin/tahoe