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

File tree

16 files changed

+65
-31
lines changed

16 files changed

+65
-31
lines changed

Dockerfile

+2-1
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

+7-4
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

+5-3
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

+2-2
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

+1-1
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

+15
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

+11-4
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

+6
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

+1-1
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

+1-1
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

engine/installation/linux/docker-ce/debian.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ from the repository.
219219
```bash
220220
$ apt-cache madison docker-ce
221221
222-
docker-ce | {{ site.docker-ce_stable_version }}.0~ce-0~debian | https://download.docker.com/linux/debian jessie/stable amd64 Packages
222+
docker-ce | {{ site.docker_ce_stable_version }}.0~ce-0~debian | https://download.docker.com/linux/debian jessie/stable amd64 Packages
223223
```
224224
225225
The contents of the list depend upon which repositories are enabled. Choose

engine/installation/linux/docker-ce/fedora.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ from the repository.
144144
```bash
145145
$ dnf list docker-ce --showduplicates | sort -r
146146
147-
docker-ce.x86_64 {{ site.docker-ce_stable_version }}.0.fc24 docker-ce-stable
147+
docker-ce.x86_64 {{ site.docker_ce_stable_version }}.0.fc24 docker-ce-stable
148148
```
149149
150150
The contents of the list depend upon which repositories are enabled, and

engine/installation/linux/docker-ce/ubuntu.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ the repository.
205205
```bash
206206
$ apt-cache madison docker-ce
207207
208-
docker-ce | {{ site.docker-ce_stable_version }}.0~ce-0~ubuntu | {{ download-url-base }} xenial/stable amd64 Packages
208+
docker-ce | {{ site.docker_ce_stable_version }}.0~ce-0~ubuntu | {{ download-url-base }} xenial/stable amd64 Packages
209209
```
210210
211211
The contents of the list depend upon which repositories are enabled. Choose

engine/installation/linux/docker-ee/suse.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ from the repository.
118118

119119
```bash
120120
$ sudo zypper addrepo \
121-
<DOCKER-EE-URL>/sles/12.3/x86_64/stable-{{ site.docker-ee_version }} \
121+
<DOCKER-EE-URL>/sles/12.3/x86_64/stable-{{ site.docker_ee_version }} \
122122
docker-ee-stable
123123
```
124124

@@ -168,7 +168,7 @@ from the repository.
168168
169169
S | Name | Type | Version | Arch | Repository
170170
--+---------------+---------+---------------------------------------+--------+---------------
171-
| docker-ee | package | {{ site.docker-ee_version }}-1 | x86_64 | docker-ee-stable
171+
| docker-ee | package | {{ site.docker_ee_version }}-1 | x86_64 | docker-ee-stable
172172
```
173173
174174
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.
243243
244244
1. Go to the Docker EE repository URL associated with your
245245
trial or subscription in your browser. Go to
246-
`sles/12.3/x86_64/stable-{{ site.docker-ee_version }}` and download the `.rpm` file for
246+
`sles/12.3/x86_64/stable-{{ site.docker_ee_version }}` and download the `.rpm` file for
247247
the Docker version you want to install.
248248
249249
2. Import Docker's official GPG key:

engine/installation/linux/docker-ee/ubuntu.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ from the repository.
143143
$ sudo add-apt-repository \
144144
"deb [arch=amd64] <DOCKER-EE-URL>/ubuntu \
145145
$(lsb_release -cs) \
146-
stable-{{ site.docker-ee_version }}"
146+
stable-{{ site.docker_ee_version }}"
147147
```
148148
149149
**s390x**:
@@ -152,7 +152,7 @@ from the repository.
152152
$ sudo add-apt-repository \
153153
"deb [arch=s390x] {{ download-url-base }} \
154154
$(lsb_release -cs) \
155-
stable-{{ site.docker-ee_version }}"
155+
stable-{{ site.docker_ee_version }}"
156156
```
157157
158158
#### Install Docker EE
@@ -185,7 +185,7 @@ from the repository.
185185
```bash
186186
$ apt-cache madison docker-ee
187187
188-
docker-ee | {{ site.docker-ee_version }}.0~ee-0~ubuntu-xenial | <DOCKER-EE-URL>/ubuntu xenial/stable amd64 Packages
188+
docker-ee | {{ site.docker_ee_version }}.0~ee-0~ubuntu-xenial | <DOCKER-EE-URL>/ubuntu xenial/stable amd64 Packages
189189
```
190190
191191
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.
239239

240240
1. Go to the Docker EE repository URL associated with your
241241
trial or subscription in your browser. Go to
242-
`ubuntu/x86_64/stable-{{ site.docker-ee_version }}` and download the `.deb` file for the
242+
`ubuntu/x86_64/stable-{{ site.docker_ee_version }}` and download the `.deb` file for the
243243
Docker EE version you want to install.
244244

245245
2. Install Docker EE, changing the path below to the path where you downloaded

test.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@ example, [swarm](glossary.md?term=swarm)).
248248
## Site-wide variables
249249
250250
Look in the top-level `_config.yml` for site-wide variables, such as
251-
`site.docker-ce_stable_version`. To use them, use Liquid like:
251+
`site.docker_ce_stable_version`. To use them, use Liquid like:
252252
253253
```liquid
254-
{% raw %}{{ site.docker-ce_stable_version }}{% endraw %}
254+
{% raw %}{{ site.docker_ce_stable_version }}{% endraw %}
255255
```
256256
257-
The current value of `site.docker-ce_stable_version` is
258-
{{ site.docker-ce_stable_version }}.
257+
The current value of `site.docker_ce_stable_version` is
258+
{{ site.docker_ce_stable_version }}.
259259
260260
## Mixing Markdown and HTML
261261

0 commit comments

Comments
 (0)