summaryrefslogtreecommitdiff
path: root/docs/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Dockerfile')
-rw-r--r--docs/Dockerfile14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/Dockerfile b/docs/Dockerfile
index 68dbbec594..345de92bd0 100644
--- a/docs/Dockerfile
+++ b/docs/Dockerfile
@@ -16,6 +16,9 @@ RUN pip install mkdocs
# this version works, the current versions fail in different ways
RUN pip install awscli==1.3.9
+# make sure the git clone is not an old cache - we've published old versions a few times now
+ENV CACHE_BUST Jul2014
+
# get my sitemap.xml branch of mkdocs and use that for now
RUN git clone https://github.com/SvenDowideit/mkdocs &&\
cd mkdocs/ &&\
@@ -27,9 +30,18 @@ ADD MAINTAINERS /docs/sources/humans.txt
WORKDIR /docs
RUN VERSION=$(cat /docs/VERSION) &&\
+ MAJOR_MINOR="${VERSION%.*}" &&\
+ for i in $(seq $MAJOR_MINOR -0.1 1.0) ; do echo "<li><a class='version' href='/v$i'>Version v$i</a></li>" ; done > /docs/sources/versions.html_fragment &&\
GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\
+ GITCOMMIT=$(cat /docs/GITCOMMIT) &&\
AWS_S3_BUCKET=$(cat /docs/AWS_S3_BUCKET) &&\
- echo "{% set docker_version = \"${VERSION}\" %}{% set docker_branch = \"${GIT_BRANCH}\" %}{% set aws_bucket = \"${AWS_S3_BUCKET}\" %}{% include \"beta_warning.html\" %}" > /docs/theme/mkdocs/version.html
+ BUILD_DATE=$(date) &&\
+ sed -i "s/\$VERSION/$VERSION/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$MAJOR_MINOR/v$MAJOR_MINOR/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$GITCOMMIT/$GITCOMMIT/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$GIT_BRANCH/$GIT_BRANCH/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$BUILD_DATE/$BUILD_DATE/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$AWS_S3_BUCKET/$AWS_S3_BUCKET/g" /docs/theme/mkdocs/base.html
# note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525
EXPOSE 8000