summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Lifton <fred.lifton@docker.com>2014-07-24 11:11:34 -0700
committerFred Lifton <fred.lifton@docker.com>2014-07-24 11:11:34 -0700
commit7dc49deedaa93ede395796108408a5459963fd92 (patch)
treeb633719915bb28a7ab762a49b34871c4a3c1c754
parent62173cccf71bd9c4c5654bdff0bfaf3e100d904d (diff)
parent2969dff717e63a245c156454a4c2695c52ae5708 (diff)
downloaddocker-docs-1.0.tar.gz
Merge pull request #7174 from SvenDowideit/docs-1.0-update-UX-to-add-version-selectordocs-1.0
update 1.0 Documentation UX to add the version selector, and update the ...
-rw-r--r--docs/Dockerfile14
-rwxr-xr-xdocs/release.sh38
-rw-r--r--docs/sources/reference/commandline/cli.md18
-rw-r--r--docs/theme/mkdocs/base.html37
-rw-r--r--docs/theme/mkdocs/css/docs.css19
-rw-r--r--docs/theme/mkdocs/css/main.css15
-rw-r--r--docs/theme/mkdocs/footer.html49
-rw-r--r--docs/theme/mkdocs/header.html2
-rw-r--r--docs/theme/mkdocs/toc.html9
9 files changed, 146 insertions, 55 deletions
diff --git a/docs/Dockerfile b/docs/Dockerfile
index 68dbbec594..345de92bd0 100644
--- a/docs/Dockerfile
+++ b/docs/Dockerfile
@@ -16,6 +16,9 @@ RUN pip install mkdocs
# this version works, the current versions fail in different ways
RUN pip install awscli==1.3.9
+# make sure the git clone is not an old cache - we've published old versions a few times now
+ENV CACHE_BUST Jul2014
+
# get my sitemap.xml branch of mkdocs and use that for now
RUN git clone https://github.com/SvenDowideit/mkdocs &&\
cd mkdocs/ &&\
@@ -27,9 +30,18 @@ ADD MAINTAINERS /docs/sources/humans.txt
WORKDIR /docs
RUN VERSION=$(cat /docs/VERSION) &&\
+ 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 &&\
GIT_BRANCH=$(cat /docs/GIT_BRANCH) &&\
+ GITCOMMIT=$(cat /docs/GITCOMMIT) &&\
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
+ BUILD_DATE=$(date) &&\
+ sed -i "s/\$VERSION/$VERSION/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$MAJOR_MINOR/v$MAJOR_MINOR/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$GITCOMMIT/$GITCOMMIT/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$GIT_BRANCH/$GIT_BRANCH/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$BUILD_DATE/$BUILD_DATE/g" /docs/theme/mkdocs/base.html &&\
+ sed -i "s/\$AWS_S3_BUCKET/$AWS_S3_BUCKET/g" /docs/theme/mkdocs/base.html
# note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525
EXPOSE 8000
diff --git a/docs/release.sh b/docs/release.sh
index 2168dfe1ee..ba309aaea9 100755
--- a/docs/release.sh
+++ b/docs/release.sh
@@ -9,7 +9,7 @@ To publish the Docker documentation you need to set your access_key and secret_k
(with the keys in a [profile $AWS_S3_BUCKET] section - so you can have more than one set of keys in your file)
and set the AWS_S3_BUCKET env var to the name of your bucket.
-make AWS_S3_BUCKET=beta-docs.docker.io docs-release
+make AWS_S3_BUCKET=docs-stage.docker.com docs-release
will then push the documentation site to your s3 bucket.
EOF
@@ -18,7 +18,19 @@ EOF
[ "$AWS_S3_BUCKET" ] || usage
-#VERSION=$(cat VERSION)
+VERSION=$(cat VERSION)
+
+if [ "$$AWS_S3_BUCKET" == "docs.docker.com" ]; then
+ if [ "${VERSION%-dev}" != "$VERSION" ]; then
+ echo "Please do not push '-dev' documentation to docs.docker.com ($VERSION)"
+ exit 1
+ fi
+fi
+
+# Remove the last version - 1.0.2-dev -> 1.0
+MAJOR_MINOR="v${VERSION%.*}"
+export MAJOR_MINOR
+
export BUCKET=$AWS_S3_BUCKET
export AWS_CONFIG_FILE=$(pwd)/awsconfig
@@ -50,7 +62,7 @@ build_current_documentation() {
upload_current_documentation() {
src=site/
- dst=s3://$BUCKET
+ dst=s3://$BUCKET$1
echo
echo "Uploading $src"
@@ -61,7 +73,8 @@ upload_current_documentation() {
# a really complicated way to send only the files we want
# if there are too many in any one set, aws s3 sync seems to fall over with 2 files to go
- endings=( json html xml css js gif png JPG )
+ # versions.html_fragment
+ endings=( json html xml css js gif png JPG ttf svg woff html_fragment )
for i in ${endings[@]}; do
include=""
for j in ${endings[@]}; do
@@ -78,11 +91,8 @@ upload_current_documentation() {
--exclude *.DS_Store \
--exclude *.psd \
--exclude *.ai \
- --exclude *.svg \
--exclude *.eot \
--exclude *.otf \
- --exclude *.ttf \
- --exclude *.woff \
--exclude *.rej \
--exclude *.rst \
--exclude *.orig \
@@ -96,6 +106,16 @@ upload_current_documentation() {
}
setup_s3
-build_current_documentation
-upload_current_documentation
+# Default to only building the version specific docs so we don't clober the latest by accident with old versions
+if [ "$BUILD_ROOT" == "yes" ]; then
+ echo "Building root documentation"
+ build_current_documentation
+ upload_current_documentation
+fi
+
+#build again with /v1.0/ prefix
+sed -i "s/^site_url:.*/site_url: \/$MAJOR_MINOR\//" mkdocs.yml
+echo "Building the /$MAJOR_MINOR/ documentation"
+build_current_documentation
+upload_current_documentation "/$MAJOR_MINOR/"
diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md
index df730bba6a..7bbf7801ac 100644
--- a/docs/sources/reference/commandline/cli.md
+++ b/docs/sources/reference/commandline/cli.md
@@ -56,7 +56,7 @@ expect an integer, and they can only be specified once.
--bip="" Use this CIDR notation address for the network bridge's IP, not compatible with -b
-d, --daemon=false Enable daemon mode
-D, --debug=false Enable debug mode
- --dns=[] Force docker to use specific DNS servers
+ --dns=[] Force Docker to use specific DNS servers
--dns-search=[] Force Docker to use specific DNS search domains
-e, --exec-driver="native" Force the Docker runtime to use a specific exec driver
-G, --group="docker" Group to assign the unix socket specified by -H when running in daemon mode
@@ -73,8 +73,8 @@ expect an integer, and they can only be specified once.
-p, --pidfile="/var/run/docker.pid" Path to use for daemon PID file
-r, --restart=true Restart previously running containers
-s, --storage-driver="" Force the Docker runtime to use a specific storage driver
- --storage-opt=[] Set storage driver options
--selinux-enabled=false Enable selinux support
+ --storage-opt=[] Set storage driver options
--tls=false Use TLS; implied by tls-verify flags
--tlscacert="/home/sven/.docker/ca.pem" Trust only remotes providing a certificate signed by the CA given here
--tlscert="/home/sven/.docker/cert.pem" Path to TLS certificate file
@@ -441,7 +441,7 @@ To see how the `docker:latest` image was built:
List images
-a, --all=false Show all images (by default filter out the intermediate image layers)
- -f, --filter=[]: Provide filter values (i.e. 'dangling=true')
+ -f, --filter=[] Provide filter values (i.e. 'dangling=true')
--no-trunc=false Don't truncate output
-q, --quiet=false Only show numeric IDs
@@ -735,7 +735,7 @@ Running `docker ps` showing 2 linked containers.
## pull
- Usage: docker pull [REGISTRY_PATH/]NAME[:TAG]
+ Usage: docker pull NAME[:TAG]
Pull an image or a repository from the registry
@@ -864,6 +864,7 @@ removed before the image is removed.
-a, --attach=[] Attach to stdin, stdout or stderr.
-c, --cpu-shares=0 CPU shares (relative weight)
--cidfile="" Write the container ID to the file
+ --cpuset="" CPUs in which to allow execution (0-3, 0,1)
-d, --detach=false Detached mode: Run container in the background, print new container id
--dns=[] Set custom dns servers
--dns-search=[] Set custom dns search domains
@@ -881,7 +882,7 @@ removed before the image is removed.
'bridge': creates a new network stack for the container on the docker bridge
'none': no networking for this container
'container:<name|id>': reuses another container network stack
- 'host': use the host network stack inside the container
+ 'host': use the host network stack inside the contaner. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
-p, --publish=[] Publish a container's port to the host
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
(use 'docker port' to see the actual mapping)
@@ -1131,9 +1132,9 @@ Search [Docker Hub](https://hub.docker.com) for images
Search the docker index for images
- --no-trunc=false Don't truncate output
- -s, --stars=0 Only displays with at least xxx stars
- --automated=false Only show automated builds
+ --automated=false Only show automated builds
+ --no-trunc=false Don't truncate output
+ -s, --stars=0 Only displays with at least xxx stars
See [*Find Public Images on Docker Hub*](
/userguide/dockerrepos/#find-public-images-on-docker-hub) for
@@ -1194,3 +1195,4 @@ both Docker client and daemon.
Usage: docker wait CONTAINER [CONTAINER...]
Block until a container stops, then print its exit code.
+
diff --git a/docs/theme/mkdocs/base.html b/docs/theme/mkdocs/base.html
index d2bba34e40..2b2b9bcbcf 100644
--- a/docs/theme/mkdocs/base.html
+++ b/docs/theme/mkdocs/base.html
@@ -3,6 +3,13 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ {% set docker_version = "$VERSION" %}{% set major_minor = "$MAJOR_MINOR" %}{% set docker_commit = "$GITCOMMIT" %}{% set docker_branch = "$GIT_BRANCH" %}{% set aws_bucket = "$AWS_S3_BUCKET" %}{% set build_date = "$BUILD_DATE" %}
+ <meta name="docker_version" content="{{ docker_version }}">
+ <meta name="docker_git_branch" content="{{ docker_branch }}">
+ <meta name="docker_git_commit" content="{{ docker_commit }}">
+ <meta name="docker_build_date" content="{{ build_date }}">
+
{% if meta.page_description %}<meta name="description" content="{{ meta.page_description[0] }}">{% endif %}
{% if meta.page_keywords %}<meta name="keywords" content="{{ meta.page_keywords[0] }}">{% endif %}
{% if site_author %}<meta name="author" content="{{ site_author }}">{% endif %}
@@ -42,11 +49,23 @@
<div id="content" class="container">
{% if current_page.title != '**HIDDEN**' %}
<div class="row" id="top-header">
- <div class="span8">
+ <div class="span7">
<h1 class="header2">{{ current_page.title }}</h1>
</div>
- <div class="span4 text-right edit-on-github">
- <a class="home-link3" href="https://github.com/dotcloud/docker/blob/master/docs/sources/{{ current_page.input_path }}" class="tertiary-nav">Edit on GitHub</a>
+ <div class="span5">
+ <div id="versionnav" class="span3 pull-right">
+ <ul class="nav version pull-right">
+ <li class="dropdown">
+ <a id="logged-in-header-username" class="dropdown-toggle" data-toggle="dropdown" href="#">
+ Latest (Version {{ major_minor }})
+ </a>
+ <ul id="documentation-version-list" class="dropdown-menu pull-right">
+ <li role="presentation" class="divider"></li>
+ <li> <a class="home-link3 tertiary-nav" href="https://github.com/dotcloud/docker/blob/master/docs/sources/{{ current_page.input_path }}" >Edit on GitHub</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
</div>
</div>
{% endif %}
@@ -59,7 +78,7 @@
</div>
</div>
<div class="span9 content-body">
- {% include "version.html" %}
+ {% include "beta_warning.html" %}
{{ content }}
</div>
</div>
@@ -126,6 +145,16 @@ piCId = '1482';
});
$(document).ready(function() {
$('#content').css("min-height", $(window).height() - 553 );
+ // load the complete versions list
+ $.get("/versions.html_fragment", function( data ) {
+ $('#documentation-version-list').prepend(data);
+ //remove any "/v1.1/" bits from font.
+ path = document.location.pathname.replace(/^\/v\d\.\d/, "");
+ $('#documentation-version-list a.version').each(function(i, e) {
+ e.href = e.href+path;
+ $(e).removeClass()
+ });
+ });
})
var userName = getCookie('docker_sso_username');
if (userName) {
diff --git a/docs/theme/mkdocs/css/docs.css b/docs/theme/mkdocs/css/docs.css
index 0f42e22ef7..bd9711cb43 100644
--- a/docs/theme/mkdocs/css/docs.css
+++ b/docs/theme/mkdocs/css/docs.css
@@ -24,6 +24,18 @@
height: 100%;
}
+#leftnav h3 {
+ font-size: 10px;
+ font-weight: 700;
+ color: #394d54;
+ line-height: 1;
+ margin: 0px 0 10px 0;
+ padding-left: 20px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
.content-body {
padding: 0px 0px 0px 20px;
}
@@ -56,12 +68,9 @@ ol li {
#nav_menu > #docsnav > #main-nav > li > a {
color: #253237;
}
-#nav_menu > #docsnav > #main-nav > li.dd_on_hover > a {
- color: #5992a3;
-}
#nav_menu > #docsnav > #main-nav > li.dd_on_hover {
- background: #b1d5df;
- color: #5992a3;
+ background: #d3f1fb;
+ color: #253237;
}
#nav_menu > #docsnav > #main-nav > li > span > b {
border-top-color: #b1d5df !important;
diff --git a/docs/theme/mkdocs/css/main.css b/docs/theme/mkdocs/css/main.css
index 42a7a18a56..3375f797da 100644
--- a/docs/theme/mkdocs/css/main.css
+++ b/docs/theme/mkdocs/css/main.css
@@ -4,7 +4,7 @@
Core Docker style file
used on
- www.docker.io
+ www.docker.com
docker-index
****************************** */
/* this is about 10% darker, but slightly different */
@@ -847,7 +847,8 @@ div + .form-inline {
.navbar #usernav .nav li {
padding-top: 15px;
}
-.navbar #usernav .nav li a {
+.navbar #usernav .nav li a,
+#versionnav .nav li a.dropdown-toggle {
font-size: 14px;
font-weight: 400;
color: #394d54;
@@ -856,10 +857,12 @@ div + .form-inline {
padding: 0 20px 0 0;
background: url("../img/nav/caret-down-user-icon.svg") no-repeat 100% 50%;
}
-.navbar #usernav .nav li a:hover {
+.navbar #usernav .nav li a:hover,
+#versionnav .nav li a.dropdown-toggle:hover {
background-image: url("../img/nav/caret-down-user-icon-over.svg");
}
-.navbar #usernav .nav li ul li {
+.navbar #usernav .nav li ul li,
+#versionnav .version {
padding: 0;
margin: 0;
height: 28px;
@@ -902,7 +905,7 @@ div + .form-inline {
margin-bottom: 22px;
}
#leftnav .nav {
- margin: 0;
+ margin: 0, 0, 20px, 0;
}
#leftnav .nav > li > a {
line-height: 22px;
@@ -2146,4 +2149,4 @@ a:hover {
background: url("../img/homepage/docker-whale-home-logo+@2x.png");
background-size: 459px 261px;
}
-} \ No newline at end of file
+}
diff --git a/docs/theme/mkdocs/footer.html b/docs/theme/mkdocs/footer.html
index 1e2d73cf14..0b887b82d0 100644
--- a/docs/theme/mkdocs/footer.html
+++ b/docs/theme/mkdocs/footer.html
@@ -1,13 +1,13 @@
<div id="footer-container" class="container">
<div id="footer" class="grey-body">
<div class="row">
- <div class="span3">
+ <div class="span2">
<span class="footer-title">Community</span>
<ul class="unstyled">
- <li><a class="primary-button" href="http://www.docker.com/community/events/">Events</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/community/events/">Events</a></li>
<li><a class="primary-button" href="http://posts.docker.com">Friends' Posts</a></li>
- <li><a class="primary-button" href="http://www.docker.com/community/meetups/">Meetups</a></li>
- <li><a class="primary-button" href="http://www.docker.com/community/governance/">Governance</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/community/meetups/">Meetups</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/community/governance/">Governance</a></li>
<li><a class="primary-button" href="http://forums.docker.com">Forums</a></li>
<li><a class="primary-button" href="http://botbot.me/freenode/docker">IRC</a></li>
<li><a class="primary-button" href="https://github.com/dotcloud/docker">GitHub</a></li>
@@ -15,28 +15,41 @@
<li><a class="primary-button" href="http://www.cafepress.com/docker">Swag</a></li>
</ul>
</div>
- <div class="span3">
+ <div class="span2">
+ <span class="footer-title">Enterprise</span>
+ <ul class="unstyled">
+ <li><a class="primary-button" href="https://www.docker.com/enterprise/support/">Support</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/enterprise/education/">Education</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/enterprise/services/">Services</a></li>
+ </ul>
+ <span class="footer-title">Partner Solutions</span>
+ <ul class="unstyled">
+ <li><a class="primary-button" href="https://www.docker.com/partners/find/">Find a Partner</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/partners/program/">Partner Program</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/partners/learn/">Learn More</a></li>
+ </ul>
+ </div>
+ <div class="span2">
<span class="footer-title">Resources</span>
<ul class="unstyled">
<li><a class="primary-button" href="https://docs.docker.com">Documentation</a></li>
- <li><a class="primary-button" href="http://www.docker.com/resources/help/">Help</a></li>
- <li><a class="primary-button" href="http://www.docker.com/resources/education/">Education</a></li>
- <li><a class="primary-button" href="http://www.docker.com/resources/partners/">Partners</a></li>
- <li><a class="primary-button" href="http://www.docker.com/resources/services/">Services</a></li>
- <li><a class="primary-button" href="http://www.docker.com/resources/howtobuy/">How To Buy</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/resources/help/">Help</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/resources/usecases/">Use Cases</a></li>
+ <li><a class="primary-button" href="http://www.docker.com/tryit/">Online Tutorial</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/resources/howtobuy/">How To Buy</a></li>
<li><a class="primary-button" href="http://status.docker.com">Status</a></li>
- <li><a class="primary-button" href="http://www.docker.com/resources/security/">Security</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/resources/security/">Security</a></li>
</ul>
</div>
- <div class="span3">
+ <div class="span2">
<span class="footer-title">Company</span>
<ul class="unstyled">
- <li><a class="primary-button" href="http://www.docker.com/company/aboutus/">About Us</a></li>
- <li><a class="primary-button" href="http://www.docker.com/company/team/">Team</a></li>
- <li><a class="primary-button" href="http://www.docker.com/company/news/">News</a></li>
- <li><a class="primary-button" href="http://www.docker.com/company/press/">Press</a></li>
- <li><a class="primary-button" href="http://www.docker.com/company/careers/">Careers</a></li>
- <li><a class="primary-button" href="http://www.docker.com/company/contact/">Contact</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/company/aboutus/">About Us</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/company/team/">Team</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/company/news/">News</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/company/press/">Press</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/company/careers/">Careers</a></li>
+ <li><a class="primary-button" href="https://www.docker.com/company/contact/">Contact</a></li>
</ul>
</div>
<div class="span3">
diff --git a/docs/theme/mkdocs/header.html b/docs/theme/mkdocs/header.html
index 3560929cac..a3b1d9bd78 100644
--- a/docs/theme/mkdocs/header.html
+++ b/docs/theme/mkdocs/header.html
@@ -24,7 +24,7 @@
</form>
<ul class="nav">
<li><a href="https://registry.hub.docker.com" title="Browse Repos">Browse Repos</a></li>
- <li><a href="http://docs.docker.com" title="Documentation">Documentation</a></li>
+ <li class="active"><a href="http://docs.docker.com" title="Documentation">Documentation</a></li>
<li><a href="http://www.docker.com/community/participate/" title="Community">Community</a></li>
<li><a href="http://www.docker.com/resources/help/" title="Help">Help</a></li>
</ul>
diff --git a/docs/theme/mkdocs/toc.html b/docs/theme/mkdocs/toc.html
index 96d15c265c..1de2a4209f 100644
--- a/docs/theme/mkdocs/toc.html
+++ b/docs/theme/mkdocs/toc.html
@@ -1,5 +1,8 @@
- {% for toc_item in toc %}
- {% for toc_item in toc_item.children %}
- <li class=""><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
+{% for toc_item in toc %}
+ {% for toc_h2_item in toc_item.children %}
+ <li class=""><a href="{{ toc_h2_item.url }}">{{ toc_h2_item.title }}</a></li>
+ {% for toc_h3_item in toc_h2_item.children %}
+ <h3><a href="{{ toc_h3_item.url }}">{{ toc_h3_item.title }}</a></h3>
+ {% endfor %}
{% endfor %}
{% endfor %}