From 4e7fb6b1f03173b0fbc41c18c9e9857b5708974a Mon Sep 17 00:00:00 2001 From: Scott Stamp Date: Fri, 12 Dec 2014 21:15:22 -0330 Subject: [PATCH 1/2] Update debian.md Fixed anchor links for Jessie/Wheezy (broken on docs.docker.com) Update debian.md Signed-off-by: Scott Stamp --- docs/sources/installation/debian.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index 1db1609699..85ac82b8dc 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -6,8 +6,8 @@ page_keywords: Docker, Docker documentation, installation, debian Docker is supported on the following versions of Debian: - - [*Debian 8.0 Jessie (64-bit)*](#debian-jessie-8-64-bit) - - [*Debian 7.5 Wheezy (64-bit)*](#debian-wheezy-7-64-bit) + - [*Debian 8.0 Jessie (64-bit)*](#debian-jessie-80-64-bit) + - [*Debian 7.5 Wheezy (64-bit)*](#debian-wheezystable-7x-64-bit) ## Debian Jessie 8.0 (64-bit) @@ -81,7 +81,7 @@ use the `-G` flag to specify an alternative group. > **Warning**: > The `docker` group (or the group specified with the `-G` flag) is > `root`-equivalent; see [*Docker Daemon Attack Surface*]( -> /articles/security/#dockersecurity-daemon) details. +> /articles/security/#docker-daemon-attack-surface) details. **Example:** From fbb9223b1adc16834768acaa7a5776697825deb2 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 16 Dec 2014 14:25:37 +1000 Subject: [PATCH 2/2] add Scott's link checker script, and fix what it finds Signed-off-by: Sven Dowideit --- Makefile | 3 + docs/README.md | 5 ++ docs/docvalidate.py | 79 +++++++++++++++++++ docs/sources/articles/baseimages.md | 2 +- docs/sources/articles/basics.md | 8 +- docs/sources/articles/chef.md | 2 +- docs/sources/articles/puppet.md | 2 +- docs/sources/articles/security.md | 2 +- docs/sources/articles/using_supervisord.md | 2 +- docs/sources/examples/apt-cacher-ng.md | 2 +- docs/sources/examples/couchdb_data_volumes.md | 2 +- docs/sources/examples/nodejs_web_app.md | 2 +- docs/sources/examples/postgresql_service.md | 2 +- docs/sources/http-routingtable.md | 2 +- docs/sources/installation/amazon.md | 8 +- docs/sources/installation/binaries.md | 2 +- docs/sources/installation/ubuntulinux.md | 2 +- .../reference/api/docker_remote_api.md | 2 +- .../reference/api/docker_remote_api_v1.10.md | 4 +- .../reference/api/docker_remote_api_v1.11.md | 2 +- .../reference/api/docker_remote_api_v1.12.md | 2 +- .../reference/api/docker_remote_api_v1.13.md | 2 +- .../reference/api/docker_remote_api_v1.14.md | 2 +- .../reference/api/docker_remote_api_v1.15.md | 2 +- .../reference/api/docker_remote_api_v1.16.md | 2 +- .../reference/api/docker_remote_api_v1.6.md | 2 +- .../reference/api/docker_remote_api_v1.7.md | 2 +- .../reference/api/docker_remote_api_v1.8.md | 2 +- .../reference/api/docker_remote_api_v1.9.md | 4 +- docs/sources/reference/builder.md | 10 +-- docs/sources/reference/commandline/cli.md | 8 +- docs/sources/reference/run.md | 8 +- docs/sources/terms/image.md | 4 +- docs/sources/terms/layer.md | 2 +- docs/sources/userguide/dockerrepos.md | 4 +- docs/sources/userguide/dockervolumes.md | 2 +- docs/sources/userguide/level1.md | 4 +- docs/sources/userguide/level2.md | 4 +- docs/test.sh | 6 ++ 39 files changed, 150 insertions(+), 57 deletions(-) create mode 100755 docs/docvalidate.py create mode 100755 docs/test.sh diff --git a/Makefile b/Makefile index 6f76fa4d29..ae1d295239 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,9 @@ docs-shell: docs-build docs-release: docs-build $(DOCKER_RUN_DOCS) -e OPTIONS -e BUILD_ROOT "$(DOCKER_DOCS_IMAGE)" ./release.sh +docs-test: docs-build + $(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" ./test.sh + test: build $(DOCKER_RUN_DOCKER) hack/make.sh binary cross test-unit test-integration test-integration-cli diff --git a/docs/README.md b/docs/README.md index de3999ba78..b3e9b32306 100755 --- a/docs/README.md +++ b/docs/README.md @@ -33,6 +33,11 @@ In the root of the `docker` source directory: If you have any issues you need to debug, you can use `make docs-shell` and then run `mkdocs serve` +## Testing the links + +You can use `make docs-test` to generate a report of missing links that are referenced in +the documentation - there should be none. + ## Adding a new document New document (`.md`) files are added to the documentation builds by adding them diff --git a/docs/docvalidate.py b/docs/docvalidate.py new file mode 100755 index 0000000000..582b8521da --- /dev/null +++ b/docs/docvalidate.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python + +""" I honestly don't even know how the hell this works, just use it. """ +__author__ = "Scott Stamp " + +from HTMLParser import HTMLParser +from urlparse import urljoin +from sys import setrecursionlimit +import re +import requests + +setrecursionlimit(10000) +root = 'http://localhost:8000' + + +class DataHolder: + + def __init__(self, value=None, attr_name='value'): + self._attr_name = attr_name + self.set(value) + + def __call__(self, value): + return self.set(value) + + def set(self, value): + setattr(self, self._attr_name, value) + return value + + def get(self): + return getattr(self, self._attr_name) + + +class Parser(HTMLParser): + global root + + ids = set() + crawled = set() + anchors = {} + pages = set() + save_match = DataHolder(attr_name='match') + + def __init__(self, origin): + self.origin = origin + HTMLParser.__init__(self) + + def handle_starttag(self, tag, attrs): + attrs = dict(attrs) + if 'href' in attrs: + href = attrs['href'] + + if re.match('^{0}|\/|\#[\S]{{1,}}'.format(root), href): + if self.save_match(re.search('.*\#(.*?)$', href)): + if self.origin not in self.anchors: + self.anchors[self.origin] = set() + self.anchors[self.origin].add( + self.save_match.match.groups(1)[0]) + + url = urljoin(root, href) + + if url not in self.crawled and not re.match('^\#', href): + self.crawled.add(url) + Parser(url).feed(requests.get(url).content) + + if 'id' in attrs: + self.ids.add(attrs['id']) + # explicit references + if 'name' in attrs: + self.ids.add(attrs['name']) + + +r = requests.get(root) +parser = Parser(root) +parser.feed(r.content) +for anchor in sorted(parser.anchors): + if not re.match('.*/\#.*', anchor): + for anchor_name in parser.anchors[anchor]: + if anchor_name not in parser.ids: + print 'Missing - ({0}): #{1}'.format( + anchor.replace(root, ''), anchor_name) diff --git a/docs/sources/articles/baseimages.md b/docs/sources/articles/baseimages.md index 3f53c8a84b..5a5addd1aa 100644 --- a/docs/sources/articles/baseimages.md +++ b/docs/sources/articles/baseimages.md @@ -5,7 +5,7 @@ page_keywords: Examples, Usage, base image, docker, documentation, examples # Create a Base Image So you want to create your own [*Base Image*]( -/terms/image/#base-image-def)? Great! +/terms/image/#base-image)? Great! The specific process will depend heavily on the Linux distribution you want to package. We have some examples below, and you are encouraged to diff --git a/docs/sources/articles/basics.md b/docs/sources/articles/basics.md index 8f3e1dc1aa..29b9a2f19c 100644 --- a/docs/sources/articles/basics.md +++ b/docs/sources/articles/basics.md @@ -17,7 +17,7 @@ If you get `docker: command not found` or something like incomplete Docker installation or insufficient privileges to access Docker on your machine. -Please refer to [*Installation*](/installation/#installation-list) +Please refer to [*Installation*](/installation) for installation instructions. ## Download a pre-built image @@ -26,7 +26,7 @@ for installation instructions. $ sudo docker pull ubuntu This will find the `ubuntu` image by name on -[*Docker Hub*](/userguide/dockerrepos/#find-public-images-on-docker-hub) +[*Docker Hub*](/userguide/dockerrepos/#searching-for-images) and download it from [Docker Hub](https://hub.docker.com) to a local image cache. @@ -174,6 +174,6 @@ will be stored (as a diff). See which images you already have using the You now have an image state from which you can create new instances. Read more about [*Share Images via -Repositories*](/userguide/dockerrepos/#working-with-the-repository) or +Repositories*](/userguide/dockerrepos) or continue to the complete [*Command -Line*](/reference/commandline/cli/#cli) +Line*](/reference/commandline/cli) diff --git a/docs/sources/articles/chef.md b/docs/sources/articles/chef.md index 6ca0eba73d..cb70215c54 100644 --- a/docs/sources/articles/chef.md +++ b/docs/sources/articles/chef.md @@ -7,7 +7,7 @@ page_keywords: chef, installation, usage, docker, documentation > **Note**: > Please note this is a community contributed installation path. The only > `official` installation is using the -> [*Ubuntu*](/installation/ubuntulinux/#ubuntu-linux) installation +> [*Ubuntu*](/installation/ubuntulinux) installation > path. This version may sometimes be out of date. ## Requirements diff --git a/docs/sources/articles/puppet.md b/docs/sources/articles/puppet.md index e664d35c97..d9a7ceb70e 100644 --- a/docs/sources/articles/puppet.md +++ b/docs/sources/articles/puppet.md @@ -6,7 +6,7 @@ page_keywords: puppet, installation, usage, docker, documentation > *Note:* Please note this is a community contributed installation path. The > only `official` installation is using the -> [*Ubuntu*](/installation/ubuntulinux/#ubuntu-linux) installation +> [*Ubuntu*](/installation/ubuntulinux) installation > path. This version may sometimes be out of date. ## Requirements diff --git a/docs/sources/articles/security.md b/docs/sources/articles/security.md index 12f7b350ec..731638025f 100644 --- a/docs/sources/articles/security.md +++ b/docs/sources/articles/security.md @@ -33,7 +33,7 @@ of another container. Of course, if the host system is setup accordingly, containers can interact with each other through their respective network interfaces — just like they can interact with external hosts. When you specify public ports for your containers or use -[*links*](/userguide/dockerlinks/#working-with-links-names) +[*links*](/userguide/dockerlinks) then IP traffic is allowed between containers. They can ping each other, send/receive UDP packets, and establish TCP connections, but that can be restricted if necessary. From a network architecture point of view, all diff --git a/docs/sources/articles/using_supervisord.md b/docs/sources/articles/using_supervisord.md index 10f32c7d1b..01e60b6596 100644 --- a/docs/sources/articles/using_supervisord.md +++ b/docs/sources/articles/using_supervisord.md @@ -6,7 +6,7 @@ page_keywords: docker, supervisor, process management > **Note**: > - **If you don't like sudo** then see [*Giving non-root -> access*](/installation/binaries/#dockergroup) +> access*](/installation/binaries/#giving-non-root-access) Traditionally a Docker container runs a single process when it is launched, for example an Apache daemon or a SSH server daemon. Often diff --git a/docs/sources/examples/apt-cacher-ng.md b/docs/sources/examples/apt-cacher-ng.md index 7dafec1593..cd92cb59a1 100644 --- a/docs/sources/examples/apt-cacher-ng.md +++ b/docs/sources/examples/apt-cacher-ng.md @@ -6,7 +6,7 @@ page_keywords: docker, example, package installation, networking, debian, ubuntu > **Note**: > - **If you don't like sudo** then see [*Giving non-root -> access*](/installation/binaries/#dockergroup). +> access*](/installation/binaries/#giving-non-root-access). > - **If you're using OS X or docker via TCP** then you shouldn't use > sudo. diff --git a/docs/sources/examples/couchdb_data_volumes.md b/docs/sources/examples/couchdb_data_volumes.md index 44043d6411..8cd2408e44 100644 --- a/docs/sources/examples/couchdb_data_volumes.md +++ b/docs/sources/examples/couchdb_data_volumes.md @@ -6,7 +6,7 @@ page_keywords: docker, example, package installation, networking, couchdb, data > **Note**: > - **If you don't like sudo** then see [*Giving non-root -> access*](/installation/binaries/#dockergroup) +> access*](/installation/binaries/#giving-non-root-access) Here's an example of using data volumes to share the same data between two CouchDB containers. This could be used for hot upgrades, testing diff --git a/docs/sources/examples/nodejs_web_app.md b/docs/sources/examples/nodejs_web_app.md index 3a9183e325..39af59afc3 100644 --- a/docs/sources/examples/nodejs_web_app.md +++ b/docs/sources/examples/nodejs_web_app.md @@ -6,7 +6,7 @@ page_keywords: docker, example, package installation, node, centos > **Note**: > - **If you don't like sudo** then see [*Giving non-root -> access*](/installation/binaries/#dockergroup) +> access*](/installation/binaries/#giving-non-root-access) The goal of this example is to show you how you can build your own Docker images from a parent image using a `Dockerfile` diff --git a/docs/sources/examples/postgresql_service.md b/docs/sources/examples/postgresql_service.md index 9a4c1816d7..21044d369a 100644 --- a/docs/sources/examples/postgresql_service.md +++ b/docs/sources/examples/postgresql_service.md @@ -6,7 +6,7 @@ page_keywords: docker, example, package installation, postgresql > **Note**: > - **If you don't like sudo** then see [*Giving non-root -> access*](/installation/binaries/#dockergroup) +> access*](/installation/binaries/#giving-non-root-access) ## Installing PostgreSQL on Docker diff --git a/docs/sources/http-routingtable.md b/docs/sources/http-routingtable.md index ff66c7a198..07029d2ca8 100644 --- a/docs/sources/http-routingtable.md +++ b/docs/sources/http-routingtable.md @@ -42,7 +42,7 @@ [`POST /containers/(id)/stop`](../reference/api/docker_remote_api_v1.9/#post--containers-(id)-stop) ** [`GET /containers/(id)/top`](../reference/api/docker_remote_api_v1.9/#get--containers-(id)-top) ** [`POST /containers/(id)/wait`](../reference/api/docker_remote_api_v1.9/#post--containers-(id)-wait) ** - [`POST /containers/create`](../reference/api/docker_remote_api_v1.9/#post--containers-create) ** + [`POST /containers/create`](/reference/api/docker_remote_api_v1.9/#create-a-container) ** [`GET /containers/json`](../reference/api/docker_remote_api_v1.9/#get--containers-json) ** [`POST /containers/(id)/resize`](../reference/api/docker_remote_api_v1.9/#get--containers-resize) **   diff --git a/docs/sources/installation/amazon.md b/docs/sources/installation/amazon.md index 58d269ad7a..6a28685dc5 100644 --- a/docs/sources/installation/amazon.md +++ b/docs/sources/installation/amazon.md @@ -40,10 +40,10 @@ over to the [User Guide](/userguide). ## Standard Ubuntu Installation If you want a more hands-on installation, then you can follow the -[*Ubuntu*](../ubuntulinux/#ubuntu-linux) instructions installing Docker -on any EC2 instance running Ubuntu. Just follow Step 1 from [*Amazon -QuickStart*](#amazon-quickstart) to pick an image (or use one of your +[*Ubuntu*](/installation/ubuntulinux) instructions installing Docker +on any EC2 instance running Ubuntu. Just follow Step 1 from the Amazon +QuickStart above to pick an image (or use one of your own) and skip the step with the *User Data*. Then continue with the -[*Ubuntu*](../ubuntulinux/#ubuntu-linux) instructions. +[*Ubuntu*](/installation/ubuntulinux) instructions. Continue with the [User Guide](/userguide/). diff --git a/docs/sources/installation/binaries.md b/docs/sources/installation/binaries.md index da2b195c0f..a2e40397f3 100644 --- a/docs/sources/installation/binaries.md +++ b/docs/sources/installation/binaries.md @@ -77,7 +77,7 @@ need to add `sudo` to all the client commands. > **Warning**: > The *docker* group (or the group specified with `-G`) is root-equivalent; > see [*Docker Daemon Attack Surface*]( -> /articles/security/#dockersecurity-daemon) details. +> /articles/security/#docker-daemon-attack-surface) details. ## Upgrades diff --git a/docs/sources/installation/ubuntulinux.md b/docs/sources/installation/ubuntulinux.md index d4df599d04..2c11927018 100644 --- a/docs/sources/installation/ubuntulinux.md +++ b/docs/sources/installation/ubuntulinux.md @@ -240,7 +240,7 @@ alternative group. > **Warning**: > The `docker` group (or the group specified with the `-G` flag) is > `root`-equivalent; see [*Docker Daemon Attack Surface*]( -> /articles/security/#dockersecurity-daemon) for details. +> /articles/security/#docker-daemon-attack-surface) for details. **Example:** diff --git a/docs/sources/reference/api/docker_remote_api.md b/docs/sources/reference/api/docker_remote_api.md index 03613d9381..6e571d3fd3 100644 --- a/docs/sources/reference/api/docker_remote_api.md +++ b/docs/sources/reference/api/docker_remote_api.md @@ -366,7 +366,7 @@ output is now generated in the client, using the You can now split stderr from stdout. This is done by prefixing a header to each transmission. See [`POST /containers/(id)/attach`]( -/reference/api/docker_remote_api_v1.9/#post--containers-(id)-attach "POST /containers/(id)/attach"). +/reference/api/docker_remote_api_v1.9/#attach-to-a-container "POST /containers/(id)/attach"). The WebSocket attach is unchanged. Note that attach calls on the previous API version didn't change. Stdout and stderr are merged. diff --git a/docs/sources/reference/api/docker_remote_api_v1.10.md b/docs/sources/reference/api/docker_remote_api_v1.10.md index eb3f5cc1e5..1855ccad64 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.10.md +++ b/docs/sources/reference/api/docker_remote_api_v1.10.md @@ -499,7 +499,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` -](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), +](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. @@ -998,7 +998,7 @@ Build an image from Dockerfile via stdin The archive must include a file called `Dockerfile` at its root. It may include any number of other files, which will be accessible in the build context (See the [*ADD build - command*](/reference/builder/#dockerbuilder)). + command*](/reference/builder/#add)). Query Parameters: diff --git a/docs/sources/reference/api/docker_remote_api_v1.11.md b/docs/sources/reference/api/docker_remote_api_v1.11.md index 838d199ea7..dcf566ffb4 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.11.md +++ b/docs/sources/reference/api/docker_remote_api_v1.11.md @@ -535,7 +535,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.12.md b/docs/sources/reference/api/docker_remote_api_v1.12.md index f38b018ef9..de15e660f8 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.12.md +++ b/docs/sources/reference/api/docker_remote_api_v1.12.md @@ -583,7 +583,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.13.md b/docs/sources/reference/api/docker_remote_api_v1.13.md index f5ca931fe7..79e1af6852 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.13.md +++ b/docs/sources/reference/api/docker_remote_api_v1.13.md @@ -576,7 +576,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.14.md b/docs/sources/reference/api/docker_remote_api_v1.14.md index a5392f3bc9..4eb316a12b 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.14.md +++ b/docs/sources/reference/api/docker_remote_api_v1.14.md @@ -581,7 +581,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.15.md b/docs/sources/reference/api/docker_remote_api_v1.15.md index ae265653a3..f7f861f5e0 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.15.md +++ b/docs/sources/reference/api/docker_remote_api_v1.15.md @@ -721,7 +721,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.16.md b/docs/sources/reference/api/docker_remote_api_v1.16.md index 72f5519e1c..5abf262059 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.16.md +++ b/docs/sources/reference/api/docker_remote_api_v1.16.md @@ -669,7 +669,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](../docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.6.md b/docs/sources/reference/api/docker_remote_api_v1.6.md index 9055b24712..d92983a54c 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.6.md +++ b/docs/sources/reference/api/docker_remote_api_v1.6.md @@ -525,7 +525,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](/api/docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.7.md b/docs/sources/reference/api/docker_remote_api_v1.7.md index 2f07b2b698..7660d744f7 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.7.md +++ b/docs/sources/reference/api/docker_remote_api_v1.7.md @@ -470,7 +470,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](/api/docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.7/#create-a-container), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.8.md b/docs/sources/reference/api/docker_remote_api_v1.8.md index faaa71397e..e0bdaa6614 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.8.md +++ b/docs/sources/reference/api/docker_remote_api_v1.8.md @@ -518,7 +518,7 @@ Status Codes: When using the TTY setting is enabled in [`POST /containers/create` - ](/api/docker_remote_api_v1.9/#post--containers-create "POST /containers/create"), + ](/reference/api/docker_remote_api_v1.9/#create-a-container "POST /containers/create"), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. diff --git a/docs/sources/reference/api/docker_remote_api_v1.9.md b/docs/sources/reference/api/docker_remote_api_v1.9.md index 4c7301ee18..7ddefc4f27 100644 --- a/docs/sources/reference/api/docker_remote_api_v1.9.md +++ b/docs/sources/reference/api/docker_remote_api_v1.9.md @@ -522,7 +522,7 @@ Status Codes: **Stream details**: When using the TTY setting is enabled in - [`POST /containers/create`](#post--containers-create), the + [`POST /containers/create`](#create-a-container), the stream is the raw data from the process PTY and client's stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr. @@ -1004,7 +1004,7 @@ Build an image from Dockerfile using a POST body. The archive must include a file called `Dockerfile` at its root. It may include any number of other files, which will be accessible in the build context (See the [*ADD build - command*](/reference/builder/#dockerbuilder)). + command*](/reference/builder/#add)). Query Parameters: diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index adc308c9d6..10689bb1f8 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -79,7 +79,7 @@ guide](/articles/dockerfile_best-practices/#build-cache) for more information): Successfully built 1a5ffc17324d When you're done with your build, you're ready to look into [*Pushing a -repository to its registry*]( /userguide/dockerrepos/#image-push). +repository to its registry*]( /userguide/dockerrepos/#contributing-to-docker-hub). ## Format @@ -93,7 +93,7 @@ be UPPERCASE in order to distinguish them from arguments more easily. Docker runs the instructions in a `Dockerfile` in order. **The first instruction must be \`FROM\`** in order to specify the [*Base -Image*](/terms/image/#base-image-def) from which you are building. +Image*](/terms/image/#base-image) from which you are building. Docker will treat lines that *begin* with `#` as a comment. A `#` marker anywhere else in the line will @@ -186,11 +186,11 @@ Or FROM : -The `FROM` instruction sets the [*Base Image*](/terms/image/#base-image-def) +The `FROM` instruction sets the [*Base Image*](/terms/image/#base-image) for subsequent instructions. As such, a valid `Dockerfile` must have `FROM` as its first instruction. The image can be any valid image – it is especially easy to start by **pulling an image** from the [*Public Repositories*]( -/userguide/dockerrepos/#using-public-repositories). +/userguide/dockerrepos). `FROM` must be the first non-comment instruction in the `Dockerfile`. @@ -763,7 +763,7 @@ and mark it as holding externally mounted volumes from native host or other containers. The value can be a JSON array, `VOLUME ["/var/log/"]`, or a plain string with multiple arguments, such as `VOLUME /var/log` or `VOLUME /var/log /var/db`. For more information/examples and mounting instructions via the -Docker client, refer to [*Share Directories via Volumes*](/userguide/dockervolumes/#volume-def) +Docker client, refer to [*Share Directories via Volumes*](/userguide/dockervolumes/#volume) documentation. > **Note**: diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index 577a4c68c0..b73f7273b6 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -459,7 +459,7 @@ Use this command to build Docker images from a Dockerfile and a The files at `PATH` or `URL` are called the "context" of the build. The build process may refer to any of the files in the context, for example -when using an [*ADD*](/reference/builder/#dockerfile-add) instruction. +when using an [*ADD*](/reference/builder/#add) instruction. When a single Dockerfile is given as `URL` or is piped through `STDIN` (`docker build - < Dockerfile`), then no context is set. @@ -539,7 +539,7 @@ machine and that no parsing of the Dockerfile happens at the client side (where you're running `docker build`). That means that *all* the files at `PATH` get sent, not just the ones listed to -[*ADD*](/reference/builder/#dockerfile-add) in the Dockerfile. +[*ADD*](/reference/builder/#add) in the Dockerfile. The transfer of context from the local machine to the Docker daemon is what the `docker` client means when you see the @@ -1814,7 +1814,7 @@ Search [Docker Hub](https://hub.docker.com) for images -s, --stars=0 Only displays with at least x stars See [*Find Public Images on Docker Hub*]( -/userguide/dockerrepos/#find-public-images-on-docker-hub) for +/userguide/dockerrepos/#searching-for-images) for more details on finding shared images from the command line. ## start @@ -1850,7 +1850,7 @@ grace period, `SIGKILL`. You can group your images together using names and tags, and then upload them to [*Share Images via Repositories*]( -/userguide/dockerrepos/#working-with-the-repository). +/userguide/dockerrepos/#contributing-to-docker-hub). ## top diff --git a/docs/sources/reference/run.md b/docs/sources/reference/run.md index e9ecfff442..d13284b5d0 100644 --- a/docs/sources/reference/run.md +++ b/docs/sources/reference/run.md @@ -7,7 +7,7 @@ page_keywords: docker, run, configure, runtime **Docker runs processes in isolated containers**. When an operator executes `docker run`, she starts a process with its own file system, its own networking, and its own isolated process tree. The -[*Image*](/terms/image/#image-def) which starts the process may define +[*Image*](/terms/image/#image) which starts the process may define defaults related to the binary to run, the networking to expose, and more, but `docker run` gives final control to the operator who starts the container from the image. That's the main reason @@ -114,7 +114,7 @@ The UUID identifiers come from the Docker daemon, and if you do not assign a name to the container with `--name` then the daemon will also generate a random string name too. The name can become a handy way to add meaning to a container since you can use this name when defining -[*links*](/userguide/dockerlinks/#working-with-links-names) (or any +[*links*](/userguide/dockerlinks) (or any other place you need to identify a container). This works for both background and foreground Docker containers. @@ -420,7 +420,7 @@ familiar with using LXC directly. ## Overriding Dockerfile image defaults -When a developer builds an image from a [*Dockerfile*](/reference/builder/#dockerbuilder) +When a developer builds an image from a [*Dockerfile*](/reference/builder) or when she commits it, the developer can set a number of default parameters that take effect when the image starts up as a container. @@ -634,7 +634,7 @@ container's `/etc/hosts` entry will be automatically updated. The volumes commands are complex enough to have their own documentation in section [*Managing data in -containers*](/userguide/dockervolumes/#volume-def). A developer can define +containers*](/userguide/dockervolumes). A developer can define one or more `VOLUME`'s associated with an image, but only the operator can give access from one container to another (or from a container to a volume mounted on the host). diff --git a/docs/sources/terms/image.md b/docs/sources/terms/image.md index 40438be631..e42a6cfa12 100644 --- a/docs/sources/terms/image.md +++ b/docs/sources/terms/image.md @@ -8,10 +8,10 @@ page_keywords: containers, lxc, concepts, explanation, image, container ![](/terms/images/docker-filesystems-debian.png) -In Docker terminology, a read-only [*Layer*](/terms/layer/#layer-def) is +In Docker terminology, a read-only [*Layer*](/terms/layer/#layer) is called an **image**. An image never changes. -Since Docker uses a [*Union File System*](/terms/layer/#ufs-def), the +Since Docker uses a [*Union File System*](/terms/layer/#union-file-system), the processes think the whole file system is mounted read-write. But all the changes go to the top-most writeable layer, and underneath, the original file in the read-only image is unchanged. Since images don't change, diff --git a/docs/sources/terms/layer.md b/docs/sources/terms/layer.md index 561807fc44..3e8704cd07 100644 --- a/docs/sources/terms/layer.md +++ b/docs/sources/terms/layer.md @@ -7,7 +7,7 @@ page_keywords: containers, lxc, concepts, explanation, image, container ## Introduction In a traditional Linux boot, the kernel first mounts the root [*File -System*](/terms/filesystem/#filesystem-def) as read-only, checks its +System*](/terms/filesystem) as read-only, checks its integrity, and then switches the whole rootfs volume to read-write mode. ## Layer diff --git a/docs/sources/userguide/dockerrepos.md b/docs/sources/userguide/dockerrepos.md index 9b5f9783e1..d8dc44e69e 100644 --- a/docs/sources/userguide/dockerrepos.md +++ b/docs/sources/userguide/dockerrepos.md @@ -36,8 +36,8 @@ e-mail address. It will then automatically log you in. You can now commit and push your own images up to your repos on Docker Hub. > **Note:** -> Your authentication credentials will be stored in the [`.dockercfg` -> authentication file](#authentication-file) in your home directory. +> Your authentication credentials will be stored in the `.dockercfg` +> authentication file in your home directory. ## Searching for images diff --git a/docs/sources/userguide/dockervolumes.md b/docs/sources/userguide/dockervolumes.md index 6f94b6dbd0..4663683c58 100644 --- a/docs/sources/userguide/dockervolumes.md +++ b/docs/sources/userguide/dockervolumes.md @@ -21,7 +21,7 @@ Docker. A *data volume* is a specially-designated directory within one or more containers that bypasses the [*Union File -System*](/terms/layer/#ufs-def) to provide several useful features for +System*](/terms/layer/#union-file-system) to provide several useful features for persistent or shared data: - Data volumes can be shared and reused between containers diff --git a/docs/sources/userguide/level1.md b/docs/sources/userguide/level1.md index 56048bfccf..cca77dc362 100644 --- a/docs/sources/userguide/level1.md +++ b/docs/sources/userguide/level1.md @@ -29,7 +29,7 @@ page_keywords: documentation, docs, the docker guide, docker guide, docker, dock

@@ -69,4 +69,4 @@ Tell the world! Back -Go to the next level \ No newline at end of file +Go to the next level diff --git a/docs/sources/userguide/level2.md b/docs/sources/userguide/level2.md index 4ff76be074..fe6654e71f 100644 --- a/docs/sources/userguide/level2.md +++ b/docs/sources/userguide/level2.md @@ -39,7 +39,7 @@ What is the Dockerfile instruction to specify the base image?
@@ -93,4 +93,4 @@ Thanks for going through our tutorial! We will be posting Level 3 in the future. To improve your Dockerfile writing skills even further, visit the Dockerfile best practices page. -Back to the Docs! \ No newline at end of file +Back to the Docs! diff --git a/docs/test.sh b/docs/test.sh new file mode 100755 index 0000000000..3512368449 --- /dev/null +++ b/docs/test.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdocs serve & +echo "Waiting for 5 seconds to allow mkdocs server to be ready" +sleep 5 +./docvalidate.py