зеркало из https://github.com/microsoft/docker.git
Merge pull request #5351 from SvenDowideit/docs-conditional-beta-warning
Docs conditional beta warning
This commit is contained in:
Коммит
03aacc4b91
3
Makefile
3
Makefile
|
@ -53,6 +53,9 @@ build: bundles
|
|||
docker build -t "$(DOCKER_IMAGE)" .
|
||||
|
||||
docs-build:
|
||||
cp ./VERSION docs/VERSION
|
||||
echo "$(GIT_BRANCH)" > docs/GIT_BRANCH
|
||||
echo "$(AWS_S3_BUCKET)" > docs/AWS_S3_BUCKET
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" docs
|
||||
|
||||
bundles:
|
||||
|
|
|
@ -39,6 +39,11 @@ WORKDIR /docs
|
|||
#convert to markdown
|
||||
#RUN ./convert.sh
|
||||
|
||||
RUN VERSION=$(cat /docs/VERSION) &&\
|
||||
GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\
|
||||
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
|
||||
|
||||
# note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525
|
||||
EXPOSE 8000
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
<div class="col-sm-8" role="main">
|
||||
{% include "breadcrumbs.html" %}
|
||||
<main id="content" role="main">
|
||||
{% include "version.html" %}
|
||||
{{ content }}
|
||||
</main>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
{% if aws_bucket != "docs.docker.io" %}
|
||||
<style>
|
||||
.bs-callout {
|
||||
padding: 20px;
|
||||
border-left: 3px solid rgb(238, 238, 238);
|
||||
width: 100% !important;
|
||||
}
|
||||
.bs-callout p {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.bs-callout h4 span {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
.bs-callout-danger {
|
||||
background-color: rgb(253, 247, 247);
|
||||
border-color: rgb(217, 83, 79);
|
||||
}
|
||||
.bs-callout h4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
color: rgb(217, 83, 79);
|
||||
}
|
||||
</style>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<h4>This is the
|
||||
<span>{% if docker_version != docker_version|replace("-dev", "bingo") %}{{ docker_branch }} development branch{% else %}beta{% endif %}</span>
|
||||
documentation for Docker version {{ docker_version }}.</h4>
|
||||
Please go to <a href="http://docs.docker.io">http://docs.docker.io</a> for the current Docker release documentation.
|
||||
{{ aws_bucket }}
|
||||
</div>
|
||||
{% endif %}
|
Загрузка…
Ссылка в новой задаче