github.com/pritambaral/docker@v1.4.2-0.20150120174542-b2fe1b3dd952/docs/Dockerfile (about)

     1  #
     2  # See the top level Makefile in https://github.com/docker/docker for usage.
     3  #
     4  FROM debian:jessie
     5  MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
     6  
     7  RUN apt-get update \
     8  	&& apt-get install -y \
     9  		gettext \
    10  		git \
    11  		libssl-dev \
    12  		make \
    13  		python-dev \
    14  		python-pip \
    15  		python-setuptools \
    16  		vim-tiny
    17  
    18  RUN pip install mkdocs
    19  
    20  # add MarkdownTools to get transclusion
    21  # (future development)
    22  #RUN easy_install -U setuptools
    23  #RUN pip install MarkdownTools2
    24  
    25  # this version works, the current versions fail in different ways
    26  RUN pip install awscli==1.4.4 pyopenssl==0.12
    27  
    28  # get my sitemap.xml branch of mkdocs and use that for now
    29  # commit hash of the newest commit of SvenDowideit/mkdocs on
    30  # docker-markdown-merge branch, it is used to break docker cache
    31  # see: https://github.com/SvenDowideit/mkdocs/tree/docker-markdown-merge
    32  RUN git clone -b docker-markdown-merge https://github.com/SvenDowideit/mkdocs \
    33  	&& cd mkdocs/ \
    34  	&& git checkout ad32549c452963b8854951d6783f4736c0f7c5d5 \
    35  	&& ./setup.py install
    36  
    37  COPY . /docs
    38  COPY MAINTAINERS /docs/sources/humans.txt
    39  WORKDIR /docs
    40  
    41  RUN VERSION=$(cat VERSION) \
    42  	&& MAJOR_MINOR="${VERSION%.*}" \
    43  	&& for i in $(seq $MAJOR_MINOR -0.1 1.0); do \
    44  		echo "<li><a class='version' href='/v$i'>Version v$i</a></li>"; \
    45  	done > sources/versions.html_fragment \
    46  	&& GIT_BRANCH=$(cat GIT_BRANCH) \
    47  	&& GITCOMMIT=$(cat GITCOMMIT) \
    48  	&& AWS_S3_BUCKET=$(cat AWS_S3_BUCKET) \
    49  	&& BUILD_DATE=$(date) \
    50  	&& sed -i "s/\$VERSION/$VERSION/g" theme/mkdocs/base.html \
    51  	&& sed -i "s/\$MAJOR_MINOR/v$MAJOR_MINOR/g" theme/mkdocs/base.html \
    52  	&& sed -i "s/\$GITCOMMIT/$GITCOMMIT/g" theme/mkdocs/base.html \
    53  	&& sed -i "s/\$GIT_BRANCH/$GIT_BRANCH/g" theme/mkdocs/base.html \
    54  	&& sed -i "s/\$BUILD_DATE/$BUILD_DATE/g" theme/mkdocs/base.html \
    55  	&& sed -i "s/\$AWS_S3_BUCKET/$AWS_S3_BUCKET/g" theme/mkdocs/base.html
    56  
    57  EXPOSE 8000
    58  
    59  RUN cd sources && rgrep --files-with-matches '{{ include ".*" }}' | xargs sed -i~ 's/{{ include "\(.*\)" }}/cat include\/\1/ge'
    60  
    61  CMD ["mkdocs", "serve"]