diff --git a/Dockerfile b/Dockerfile index c954b97dfbd..16efe7849f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,8 @@ ENV ENGINE_BRANCH="17.06.x" ENV DISTRIBUTION_SVN_BRANCH="branches/release/2.6" ENV DISTRIBUTION_BRANCH="release/2.6" -RUN sh md_source/_scripts/fetch-upstream-resources.sh \ +RUN apk --update add bash \ + && bash ./md_source/_scripts/fetch-upstream-resources.sh \ && jekyll build -s md_source -d target --config md_source/_config.yml \ && rm -rf target/apidocs/layouts \ && find target -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \ diff --git a/_config.yml b/_config.yml index f6a6f946a81..c71cd7e1387 100644 --- a/_config.yml +++ b/_config.yml @@ -13,10 +13,13 @@ lsi: false url: https://docs.docker.com keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13", "v17.03", "v17.06"] -# Component versions -- address like site.docker-ce_stable_version -docker-ce_stable_version: "17.09" -docker-ce_edge_version: "17.09" -docker-ee_version: "17.06" +# Component versions -- address like site.docker_ce_stable_version +# You can't have - characters in these for non-YAML reasons + +docker_ce_stable_version: "17.09" +latest_stable_docker_engine_api_version: "1.32" +docker_ce_edge_version: "17.09" +docker_ee_version: "17.06" compose_version: "1.16.1" machine_version: "0.12.2" distribution_version: "2.6" diff --git a/_data/toc.yaml b/_data/toc.yaml index d76790a3e77..53e856a2584 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -608,10 +608,12 @@ reference: title: Get started - path: /engine/api/sdks/ title: SDKs - - path: /engine/api/v1.32/ - title: v1.32 Reference - - sectiontitle: Previous API versions + - path: /engine/api/latest/ + title: v{{ site.latest_stable_docker_engine_api_version }} reference + - sectiontitle: API reference by version section: + - path: /engine/api/v1.32/ + title: v1.32 Reference - path: /engine/api/version-history/ title: Version history overview - path: /engine/api/v1.31/ diff --git a/_includes/ee-linux-install-reuse.md b/_includes/ee-linux-install-reuse.md index bbb85cb34c0..ba6de89cc77 100644 --- a/_includes/ee-linux-install-reuse.md +++ b/_includes/ee-linux-install-reuse.md @@ -151,7 +151,7 @@ You can install Docker EE in different ways, depending on your needs: ```bash $ sudo yum list docker-ee --showduplicates | sort -r - docker-ee.x86_64 {{ site.docker-ee_version }}.ee.2-1.el7.{{ linux-dist }} docker-ee-stable-17.06 + docker-ee.x86_64 {{ site.docker_ee_version }}.ee.2-1.el7.{{ linux-dist }} docker-ee-stable-17.06 ``` The contents of the list depend upon which repositories you have enabled, @@ -246,7 +246,7 @@ upgrade Docker EE. 1. Go to the Docker EE repository URL associated with your trial or subscription in your browser. Go to - `{{ linux-dist-url-slug }}/7/x86_64/stable-{{ site.docker-ee_version }}/Packages` and + `{{ linux-dist-url-slug }}/7/x86_64/stable-{{ site.docker_ee_version }}/Packages` and download the `.{{ package-format | downcase }}` file for the Docker version you want to install. diff --git a/_layouts/docs.html b/_layouts/docs.html index 6613c91ccb9..dbac2469817 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -248,7 +248,7 @@

{{ page.title }}

{% endif %} {% if page.advisory %} // Default to assuming this is an archive and hiding some stuff // See js/archive.js and js/docs.js for logic relating to this var isArchive = true; - var dockerVersion = 'v{{ site.docker-ce_stable_version }}'; + var dockerVersion = 'v{{ site.docker_ce_stable_version }}'; diff --git a/_scripts/fetch-upstream-resources.sh b/_scripts/fetch-upstream-resources.sh index 72b9e284a63..a8baa922eec 100755 --- a/_scripts/fetch-upstream-resources.sh +++ b/_scripts/fetch-upstream-resources.sh @@ -5,6 +5,21 @@ # Relies on the following environment variables which are usually set by # the Dockerfile. Uncomment them here to override for debugging +# Parse some variables from _config.yml and make them available to this script +# This only finds top-level variables with _version in them that don't have any +# leading space. This is brittle! +while read i; do + # Store the key as a variable name and the value as the variable value + varname=$(echo "$i" | sed 's/"//g' | awk -F ':' {'print $1'} | tr -d '[:space:]') + varvalue=$(echo "$i" | sed 's/"//g' | awk -F ':' {'print $2'} | tr -d '[:space:]') + echo "Setting \$${varname} to $varvalue" + declare "$varname=$varvalue" +done < <(cat md_source/_config.yml |grep '_version:' |grep '^[a-z].*') + +# Replace variable in toc.yml with value from above +#echo "Replacing the string 'site.latest_stable_docker_engine_api_version' in _data/toc.yml with $latest_stable_docker_engine_api_version" +sed -i "s/{{ site.latest_stable_docker_engine_api_version }}/$latest_stable_docker_engine_api_version/g" md_source/_data/toc.yaml + # Engine stable ENGINE_SVN_BRANCH="branches/17.09" ENGINE_BRANCH="17.09" diff --git a/develop/sdk/index.md b/develop/sdk/index.md index d22d67c0577..af598306e0e 100644 --- a/develop/sdk/index.md +++ b/develop/sdk/index.md @@ -44,10 +44,16 @@ go get github.com/docker/docker/client [Read the full Docker Engine Python SDK reference](https://docker-py.readthedocs.io/). +## View the API reference + +You can +[view the reference for the latest version of the API](/engine/api/latest/) +or [choose a specific version](/engine/api/version-history/). + ## Versioned API and SDK -The version of the Docker API you should use depends upon the version of your -Docker daemon and Docker client. +The version of the Docker Engine API you should use depends upon the version of +your Docker daemon and Docker client. A given version of the Docker Engine SDK supports a specific version of the Docker Engine API, as well as all earlier versions. If breaking changes occur, @@ -124,8 +130,9 @@ You can specify the API version to use, in one of the following ways: Use the following guidelines to choose the SDK or API version to use in your code: -- If you're starting a new project, use the latest version, but do specify the - version you are using. This helps prevent surprises. +- If you're starting a new project, use the + [latest version](/engine/api/latest/), but do specify the version you are + using. This helps prevent surprises. - If you need a new feature, update your code use at least the oldest version that supports the feature, and prefer the latest version you are able to use. - Otherwise, continue to use the version that your code is already using. diff --git a/engine/api/latest/index.html b/engine/api/latest/index.html new file mode 100644 index 00000000000..408ac7a573a --- /dev/null +++ b/engine/api/latest/index.html @@ -0,0 +1,6 @@ +--- +--- + + +

Redirecting to the latest version of the Docker Engine API reference. + \ No newline at end of file diff --git a/engine/installation/linux/docker-ce/binaries.md b/engine/installation/linux/docker-ce/binaries.md index 6c05434faa3..5d262846938 100644 --- a/engine/installation/linux/docker-ce/binaries.md +++ b/engine/installation/linux/docker-ce/binaries.md @@ -163,7 +163,7 @@ the `dockerd.exe` and `docker.exe` binaries are included. 1. Use the following PowerShell commands to install and start Docker: ```none - PS C:\> Invoke-WebRequest https://download.docker.com/win/static/stable/x86_64//docker-{{ site.docker-ce_stable_version }}.0-ce.zip -UseBasicParsing -OutFile docker.zip + PS C:\> Invoke-WebRequest https://download.docker.com/win/static/stable/x86_64//docker-{{ site.docker_ce_stable_version }}.0-ce.zip -UseBasicParsing -OutFile docker.zip PS C:\> Expand-Archive docker.zip -DestinationPath $Env:ProgramFiles diff --git a/engine/installation/linux/docker-ce/centos.md b/engine/installation/linux/docker-ce/centos.md index 299f9b4ae96..a9bbadeb68e 100644 --- a/engine/installation/linux/docker-ce/centos.md +++ b/engine/installation/linux/docker-ce/centos.md @@ -151,7 +151,7 @@ from the repository. ```bash $ yum list docker-ce --showduplicates | sort -r - docker-ce.x86_64 {{ site.docker-ce_stable_version }}.ce-1.el7.centos docker-ce-stable + docker-ce.x86_64 {{ site.docker_ce_stable_version }}.ce-1.el7.centos docker-ce-stable ``` The contents of the list depend upon which repositories are enabled, and diff --git a/engine/installation/linux/docker-ce/debian.md b/engine/installation/linux/docker-ce/debian.md index 2a15d3d2b19..8c85ebddddf 100644 --- a/engine/installation/linux/docker-ce/debian.md +++ b/engine/installation/linux/docker-ce/debian.md @@ -219,7 +219,7 @@ from the repository. ```bash $ apt-cache madison docker-ce - docker-ce | {{ site.docker-ce_stable_version }}.0~ce-0~debian | https://download.docker.com/linux/debian jessie/stable amd64 Packages + docker-ce | {{ site.docker_ce_stable_version }}.0~ce-0~debian | https://download.docker.com/linux/debian jessie/stable amd64 Packages ``` The contents of the list depend upon which repositories are enabled. Choose diff --git a/engine/installation/linux/docker-ce/fedora.md b/engine/installation/linux/docker-ce/fedora.md index 3000bdb3a7b..268ec48a786 100644 --- a/engine/installation/linux/docker-ce/fedora.md +++ b/engine/installation/linux/docker-ce/fedora.md @@ -144,7 +144,7 @@ from the repository. ```bash $ dnf list docker-ce --showduplicates | sort -r - docker-ce.x86_64 {{ site.docker-ce_stable_version }}.0.fc24 docker-ce-stable + docker-ce.x86_64 {{ site.docker_ce_stable_version }}.0.fc24 docker-ce-stable ``` The contents of the list depend upon which repositories are enabled, and diff --git a/engine/installation/linux/docker-ce/ubuntu.md b/engine/installation/linux/docker-ce/ubuntu.md index 50d297a14e7..d9ba3d51682 100644 --- a/engine/installation/linux/docker-ce/ubuntu.md +++ b/engine/installation/linux/docker-ce/ubuntu.md @@ -205,7 +205,7 @@ the repository. ```bash $ apt-cache madison docker-ce - docker-ce | {{ site.docker-ce_stable_version }}.0~ce-0~ubuntu | {{ download-url-base }} xenial/stable amd64 Packages + docker-ce | {{ site.docker_ce_stable_version }}.0~ce-0~ubuntu | {{ download-url-base }} xenial/stable amd64 Packages ``` The contents of the list depend upon which repositories are enabled. Choose diff --git a/engine/installation/linux/docker-ee/suse.md b/engine/installation/linux/docker-ee/suse.md index d1ced86f840..92b4570e6a7 100644 --- a/engine/installation/linux/docker-ee/suse.md +++ b/engine/installation/linux/docker-ee/suse.md @@ -118,7 +118,7 @@ from the repository. ```bash $ sudo zypper addrepo \ - /sles/12.3/x86_64/stable-{{ site.docker-ee_version }} \ + /sles/12.3/x86_64/stable-{{ site.docker_ee_version }} \ docker-ee-stable ``` @@ -168,7 +168,7 @@ from the repository. S | Name | Type | Version | Arch | Repository --+---------------+---------+---------------------------------------+--------+--------------- - | docker-ee | package | {{ site.docker-ee_version }}-1 | x86_64 | docker-ee-stable + | docker-ee | package | {{ site.docker_ee_version }}-1 | x86_64 | docker-ee-stable ``` The contents of the list depend upon which repositories you have enabled. @@ -243,7 +243,7 @@ need to download a new file each time you want to upgrade Docker EE. 1. Go to the Docker EE repository URL associated with your trial or subscription in your browser. Go to - `sles/12.3/x86_64/stable-{{ site.docker-ee_version }}` and download the `.rpm` file for + `sles/12.3/x86_64/stable-{{ site.docker_ee_version }}` and download the `.rpm` file for the Docker version you want to install. 2. Import Docker's official GPG key: diff --git a/engine/installation/linux/docker-ee/ubuntu.md b/engine/installation/linux/docker-ee/ubuntu.md index 728521729c4..3177913e1a6 100644 --- a/engine/installation/linux/docker-ee/ubuntu.md +++ b/engine/installation/linux/docker-ee/ubuntu.md @@ -143,7 +143,7 @@ from the repository. $ sudo add-apt-repository \ "deb [arch=amd64] /ubuntu \ $(lsb_release -cs) \ - stable-{{ site.docker-ee_version }}" + stable-{{ site.docker_ee_version }}" ``` **s390x**: @@ -152,7 +152,7 @@ from the repository. $ sudo add-apt-repository \ "deb [arch=s390x] {{ download-url-base }} \ $(lsb_release -cs) \ - stable-{{ site.docker-ee_version }}" + stable-{{ site.docker_ee_version }}" ``` #### Install Docker EE @@ -185,7 +185,7 @@ from the repository. ```bash $ apt-cache madison docker-ee - docker-ee | {{ site.docker-ee_version }}.0~ee-0~ubuntu-xenial | /ubuntu xenial/stable amd64 Packages + docker-ee | {{ site.docker_ee_version }}.0~ee-0~ubuntu-xenial | /ubuntu xenial/stable amd64 Packages ``` The contents of the list depend upon which repositories are enabled, @@ -239,7 +239,7 @@ a new file each time you want to upgrade Docker EE. 1. Go to the Docker EE repository URL associated with your trial or subscription in your browser. Go to - `ubuntu/x86_64/stable-{{ site.docker-ee_version }}` and download the `.deb` file for the + `ubuntu/x86_64/stable-{{ site.docker_ee_version }}` and download the `.deb` file for the Docker EE version you want to install. 2. Install Docker EE, changing the path below to the path where you downloaded diff --git a/test.md b/test.md index 3759dae49aa..ed43c2ac52d 100644 --- a/test.md +++ b/test.md @@ -248,14 +248,14 @@ example, [swarm](glossary.md?term=swarm)). ## Site-wide variables Look in the top-level `_config.yml` for site-wide variables, such as -`site.docker-ce_stable_version`. To use them, use Liquid like: +`site.docker_ce_stable_version`. To use them, use Liquid like: ```liquid -{% raw %}{{ site.docker-ce_stable_version }}{% endraw %} +{% raw %}{{ site.docker_ce_stable_version }}{% endraw %} ``` -The current value of `site.docker-ce_stable_version` is -{{ site.docker-ce_stable_version }}. +The current value of `site.docker_ce_stable_version` is +{{ site.docker_ce_stable_version }}. ## Mixing Markdown and HTML