use the beta-warning area to tell the user what VERSION of docker, git
branch, and links to the official release version docs are.
requires / extends PR #5272
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
| ... | ... |
@@ -53,6 +53,9 @@ build: bundles |
| 53 | 53 |
docker build -t "$(DOCKER_IMAGE)" . |
| 54 | 54 |
|
| 55 | 55 |
docs-build: |
| 56 |
+ cp ./VERSION docs/VERSION |
|
| 57 |
+ echo "$(GIT_BRANCH)" > docs/GIT_BRANCH |
|
| 58 |
+ echo "$(AWS_S3_BUCKET)" > docs/AWS_S3_BUCKET |
|
| 56 | 59 |
docker build -t "$(DOCKER_DOCS_IMAGE)" docs |
| 57 | 60 |
|
| 58 | 61 |
bundles: |
| ... | ... |
@@ -39,6 +39,11 @@ WORKDIR /docs |
| 39 | 39 |
#convert to markdown |
| 40 | 40 |
#RUN ./convert.sh |
| 41 | 41 |
|
| 42 |
+RUN VERSION=$(cat /docs/VERSION) &&\ |
|
| 43 |
+ GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\ |
|
| 44 |
+ AWS_S3_BUCKET=$(cat /docs/AWS_S3_BUCKET) &&\ |
|
| 45 |
+ 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
|
|
| 46 |
+ |
|
| 42 | 47 |
# note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525 |
| 43 | 48 |
EXPOSE 8000 |
| 44 | 49 |
|
| ... | ... |
@@ -1,3 +1,4 @@ |
| 1 |
+{% if aws_bucket != "docs.docker.io" %}
|
|
| 1 | 2 |
<style> |
| 2 | 3 |
.bs-callout {
|
| 3 | 4 |
padding: 20px; |
| ... | ... |
@@ -22,6 +23,10 @@ |
| 22 | 22 |
} |
| 23 | 23 |
</style> |
| 24 | 24 |
<div class="bs-callout bs-callout-danger"> |
| 25 |
-<h4>You are looking at the <span>beta</span> docs for the development version of Docker.</h4> |
|
| 26 |
-There is a chance of them being different from the prior versions. |
|
| 25 |
+ <h4>This is the |
|
| 26 |
+ <span>{% if docker_version != docker_version|replace("-dev", "bingo") %}{{ docker_branch }} development branch{% else %}beta{% endif %}</span>
|
|
| 27 |
+ documentation for Docker version {{ docker_version }}.</h4>
|
|
| 28 |
+ Please go to <a href="http://docs.docker.io">http://docs.docker.io</a> for the current Docker release documentation. |
|
| 29 |
+ {{ aws_bucket }}
|
|
| 27 | 30 |
</div> |
| 31 |
+{% endif %}
|