github.com/feiyang21687/docker@v1.5.0/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"]
    62  
    63  # Initial Dockerfile driven documenation aggregation
    64  # Sven plans to move each Dockerfile into the respective repository
    65  
    66  # Docker Swarm
    67  #ADD https://raw.githubusercontent.com/docker/swarm/master/userguide.md /docs/sources/swarm/README.md
    68  #ADD https://raw.githubusercontent.com/docker/swarm/master/discovery/README.md /docs/sources/swarm/discovery.md
    69  #ADD https://raw.githubusercontent.com/docker/swarm/master/api/README.md /docs/sources/swarm/API.md
    70  #ADD https://raw.githubusercontent.com/docker/swarm/master/scheduler/filter/README.md /docs/sources/swarm/scheduler/filter.md
    71  #ADD https://raw.githubusercontent.com/docker/swarm/master/scheduler/strategy/README.md /docs/sources/swarm/scheduler/strategy.md
    72  
    73  # Docker Machine
    74  # ADD https://raw.githubusercontent.com/docker/machine/master/docs/dockermachine.md /docs/sources/machine/userguide.md
    75  
    76  # Docker Compose
    77  # ADD https://raw.githubusercontent.com/docker/fig/master/docs/index.md /docs/sources/compose/userguide.md
    78  # ADD https://raw.githubusercontent.com/docker/fig/master/docs/install.md /docs/sources/compose/install.md
    79  # ADD https://raw.githubusercontent.com/docker/fig/master/docs/cli.md /docs/sources/compose/cli.md
    80  # ADD https://raw.githubusercontent.com/docker/fig/master/docs/yml.md /docs/sources/compose/yml.md
    81  
    82  # add the project docs from the `mkdocs-<project>.yml` files
    83  # RUN cd /docs && ./build.sh
    84  
    85  # remove `^---*` lines from md's
    86  # RUN cd /docs/sources && find . -name "*.md" | xargs sed -i~ -n '/^---*/!p'