Sitelet https://github.com/displague/docker.github.io/commit/6aae2e4e84402e8ef949669b04dae270b5bd908e
Skip to content

Commit 6aae2e4

Browse files
author
Misty Stanley-Jones
authored
Add pointer to latest API ref (docker#4897)
1 parent 6f3acdf commit 6aae2e4

16 files changed

Lines changed: 65 additions & 31 deletions

File tree

‎Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ ENV ENGINE_BRANCH="17.06.x"
2727
ENV DISTRIBUTION_SVN_BRANCH="branches/release/2.6"
2828
ENV DISTRIBUTION_BRANCH="release/2.6"
2929

30-
RUN sh md_source/_scripts/fetch-upstream-resources.sh \
30+
RUN apk --update add bash \
31+
&& bash ./md_source/_scripts/fetch-upstream-resources.sh \
3132
&& jekyll build -s md_source -d target --config md_source/_config.yml \
3233
&& rm -rf target/apidocs/layouts \
3334
&& find target -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \

‎_config.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ lsi: false
1313
url: https://docs.docker.com
1414
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"]
1515

16-
# Component versions -- address like site.docker-ce_stable_version
17-
docker-ce_stable_version: "17.09"
18-
docker-ce_edge_version: "17.09"
19-
docker-ee_version: "17.06"
16+
# Component versions -- address like site.docker_ce_stable_version
17+
# You can't have - characters in these for non-YAML reasons
18+
19+
docker_ce_stable_version: "17.09"
20+
latest_stable_docker_engine_api_version: "1.32"
21+
docker_ce_edge_version: "17.09"
22+
docker_ee_version: "17.06"
2023
compose_version: "1.16.1"
2124
machine_version: "0.12.2"
2225
distribution_version: "2.6"

‎_data/toc.yaml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,12 @@ reference:
608608
title: Get started
609609
- path: /engine/api/sdks/
610610
title: SDKs
611-
- path: /engine/api/v1.32/
612-
title: v1.32 Reference
613-
- sectiontitle: Previous API versions
611+
- path: /engine/api/latest/
612+
title: v{{ site.latest_stable_docker_engine_api_version }} reference
613+
- sectiontitle: API reference by version
614614
section:
615+
- path: /engine/api/v1.32/
616+
title: v1.32 Reference
615617
- path: /engine/api/version-history/
616618
title: Version history overview
617619
- path: /engine/api/v1.31/

‎_includes/ee-linux-install-reuse.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ You can install Docker EE in different ways, depending on your needs:
151151
```bash
152152
$ sudo yum list docker-ee --showduplicates | sort -r
153153
154-
docker-ee.x86_64 {{ site.docker-ee_version }}.ee.2-1.el7.{{ linux-dist }} docker-ee-stable-17.06
154+
docker-ee.x86_64 {{ site.docker_ee_version }}.ee.2-1.el7.{{ linux-dist }} docker-ee-stable-17.06
155155
```
156156
157157
The contents of the list depend upon which repositories you have enabled,
@@ -246,7 +246,7 @@ upgrade Docker EE.
246246
247247
1. Go to the Docker EE repository URL associated with your
248248
trial or subscription in your browser. Go to
249-
`{{ linux-dist-url-slug }}/7/x86_64/stable-{{ site.docker-ee_version }}/Packages` and
249+
`{{ linux-dist-url-slug }}/7/x86_64/stable-{{ site.docker_ee_version }}/Packages` and
250250
download the `.{{ package-format | downcase }}` file for the Docker version
251251
you want to install.
252252

‎_layouts/docs.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ <h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
248248
// Default to assuming this is an archive and hiding some stuff
249249
// See js/archive.js and js/docs.js for logic relating to this
250250
var isArchive = true;
251-
var dockerVersion = 'v{{ site.docker-ce_stable_version }}';
251+
var dockerVersion = 'v{{ site.docker_ce_stable_version }}';
252252
</script>
253253
<script src="/js/archive.js"></script>
254254
<script src="/js/stickyfill.min.js"></script>

‎_scripts/fetch-upstream-resources.sh‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55
# Relies on the following environment variables which are usually set by
66
# the Dockerfile. Uncomment them here to override for debugging
77

8+
# Parse some variables from _config.yml and make them available to this script
9+
# This only finds top-level variables with _version in them that don't have any
10+
# leading space. This is brittle!
11+
while read i; do
12+
# Store the key as a variable name and the value as the variable value
13+
varname=$(echo "$i" | sed 's/"//g' | awk -F ':' {'print $1'} | tr -d '[:space:]')
14+
varvalue=$(echo "$i" | sed 's/"//g' | awk -F ':' {'print $2'} | tr -d '[:space:]')
15+
echo "Setting \$${varname} to $varvalue"
16+
declare "$varname=$varvalue"
17+
done < <(cat md_source/_config.yml |grep '_version:' |grep '^[a-z].*')
18+
19+
# Replace variable in toc.yml with value from above
20+
#echo "Replacing the string 'site.latest_stable_docker_engine_api_version' in _data/toc.yml with $latest_stable_docker_engine_api_version"
21+
sed -i "s/{{ site.latest_stable_docker_engine_api_version }}/$latest_stable_docker_engine_api_version/g" md_source/_data/toc.yaml
22+
823
# Engine stable
924
ENGINE_SVN_BRANCH="branches/17.09"
1025
ENGINE_BRANCH="17.09"

‎develop/sdk/index.md‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ go get github.com/docker/docker/client
4444

4545
[Read the full Docker Engine Python SDK reference](https://docker-py.readthedocs.io/).
4646

47+
## View the API reference
48+
49+
You can
50+
[view the reference for the latest version of the API](/engine/api/latest/)
51+
or [choose a specific version](/engine/api/version-history/).
52+
4753
## Versioned API and SDK
4854

49-
The version of the Docker API you should use depends upon the version of your
50-
Docker daemon and Docker client.
55+
The version of the Docker Engine API you should use depends upon the version of
56+
your Docker daemon and Docker client.
5157

5258
A given version of the Docker Engine SDK supports a specific version of the
5359
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:
124130
Use the following guidelines to choose the SDK or API version to use in your
125131
code:
126132

127-
- If you're starting a new project, use the latest version, but do specify the
128-
version you are using. This helps prevent surprises.
133+
- If you're starting a new project, use the
134+
[latest version](/engine/api/latest/), but do specify the version you are
135+
using. This helps prevent surprises.
129136
- If you need a new feature, update your code use at least the oldest version
130137
that supports the feature, and prefer the latest version you are able to use.
131138
- Otherwise, continue to use the version that your code is already using.

‎engine/api/latest/index.html‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
---
3+
<html>
4+
<head><meta http-equiv="refresh" content="0;url=/engine/api/v{{ site.latest_stable_docker_engine_api_version }}/" /></head>
5+
<body><p>Redirecting to the latest version of the Docker Engine API reference.</body>
6+
</html>

‎engine/installation/linux/docker-ce/binaries.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ the `dockerd.exe` and `docker.exe` binaries are included.
163163
1. Use the following PowerShell commands to install and start Docker:
164164

165165
```none
166-
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
166+
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
167167
168168
PS C:\> Expand-Archive docker.zip -DestinationPath $Env:ProgramFiles
169169

‎engine/installation/linux/docker-ce/centos.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ from the repository.
151151
```bash
152152
$ yum list docker-ce --showduplicates | sort -r
153153
154-
docker-ce.x86_64 {{ site.docker-ce_stable_version }}.ce-1.el7.centos docker-ce-stable
154+
docker-ce.x86_64 {{ site.docker_ce_stable_version }}.ce-1.el7.centos docker-ce-stable
155155
```
156156
157157
The contents of the list depend upon which repositories are enabled, and

0 commit comments

Comments
 (0)