2013-10-28 20:39:44 -04:00
#
2014-07-24 18:19:50 -04:00
# See the top level Makefile in https://github.com/docker/docker for usage.
2013-10-28 20:39:44 -04:00
#
2014-04-15 02:01:25 -04:00
FROM debian:jessie
MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
2013-08-29 19:49:41 -04:00
2014-10-01 21:11:10 -04:00
RUN apt-get update && apt-get install -y make python-pip python-setuptools vim-tiny git gettext python-dev libssl-dev
2013-08-29 19:49:41 -04:00
2014-04-15 02:01:25 -04:00
RUN pip install mkdocs
# add MarkdownTools to get transclusion
# (future development)
#RUN easy_install -U setuptools
#RUN pip install MarkdownTools2
2014-06-17 22:38:45 -04:00
# this version works, the current versions fail in different ways
2014-10-01 21:11:10 -04:00
RUN pip install awscli==1.4.4 pyopenssl==0.12
2014-04-15 02:01:25 -04:00
2014-07-22 03:21:03 -04:00
# make sure the git clone is not an old cache - we've published old versions a few times now
ENV CACHE_BUST Jul2014
2014-04-15 02:01:25 -04:00
# get my sitemap.xml branch of mkdocs and use that for now
RUN git clone https://github.com/SvenDowideit/mkdocs &&\
cd mkdocs/ &&\
git checkout docker-markdown-merge &&\
./setup.py install
ADD . /docs
ADD MAINTAINERS /docs/sources/humans.txt
WORKDIR /docs
2014-04-23 02:28:06 -04:00
RUN VERSION=$(cat /docs/VERSION) &&\
2014-07-21 01:51:14 -04:00
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 &&\
2014-04-23 02:28:06 -04:00
GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\
2014-06-22 23:10:00 -04:00
GITCOMMIT=$(cat /docs/GITCOMMIT) &&\
2014-04-23 02:28:06 -04:00
AWS_S3_BUCKET=$(cat /docs/AWS_S3_BUCKET) &&\
2014-07-22 05:05:18 -04:00
BUILD_DATE=$(date) &&\
2014-06-22 23:10:00 -04:00
sed -i "s/\$VERSION/$VERSION/g" /docs/theme/mkdocs/base.html &&\
2014-07-21 01:51:14 -04:00
sed -i "s/\$MAJOR_MINOR/v$MAJOR_MINOR/g" /docs/theme/mkdocs/base.html &&\
2014-06-22 23:10:00 -04:00
sed -i "s/\$GITCOMMIT/$GITCOMMIT/g" /docs/theme/mkdocs/base.html &&\
sed -i "s/\$GIT_BRANCH/$GIT_BRANCH/g" /docs/theme/mkdocs/base.html &&\
2014-07-22 05:05:18 -04:00
sed -i "s/\$BUILD_DATE/$BUILD_DATE/g" /docs/theme/mkdocs/base.html &&\
2014-06-22 23:10:00 -04:00
sed -i "s/\$AWS_S3_BUCKET/$AWS_S3_BUCKET/g" /docs/theme/mkdocs/base.html
2014-04-23 02:28:06 -04:00
2014-07-24 18:19:50 -04:00
# note, EXPOSE is only last because of https://github.com/docker/docker/issues/3525
2014-04-15 02:01:25 -04:00
EXPOSE 8000
CMD ["mkdocs", "serve"]