Skip to content
98 changes: 71 additions & 27 deletions _includes/cli.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% capture tabChar %} {% endcapture %}<!-- Make sure atom is using hard tabs -->
{% if include.datafolder and include.datafile %}

{% assign controller_data = site.data[include.datafolder][include.datafile] %}
{% assign parentPath = page.path | prepend: "/" | remove: page.name %}

## Description

Expand All @@ -19,7 +18,7 @@ your client and daemon API versions.

{% if controller_data.deprecated %}

> This command is [deprecated](/engine/deprecated.md){: target="_blank" class="_"}.
> This command is [deprecated](/engine/deprecated/){: target="_blank" class="_"}.
>
> It may be removed in a future Docker version.
{: .warning }
Expand All @@ -42,7 +41,7 @@ your client and daemon API versions.
> This command is experimental on the Docker daemon. It should not be used in
> production environments.
> To enable experimental features on the Docker daemon, edit the
> [daemon.json](/engine/reference/commandline/dockerd.md#daemon-configuration-file)
> [daemon.json](/engine/reference/commandline/dockerd/#daemon-configuration-file)
> and set `experimental` to `true`.
>
> {% include experimental.md %}
Expand All @@ -56,7 +55,7 @@ your client and daemon API versions.
> **It should not be used in production environments.**
>
> To enable experimental features in the Docker CLI, edit the
> [config.json](/engine/reference/commandline/cli.md#configuration-files)
> [config.json](/engine/reference/commandline/cli/#configuration-files)
> and set `experimental` to `enabled`. You can go [here](https://docs.docker.com/engine/reference/commandline/cli/#experimental-features)
> for more information.
{: .important }
Expand All @@ -81,8 +80,8 @@ your client and daemon API versions.

## Usage

```none
{{ controller_data.usage | replace: tabChar,"" | strip }}{% if controller_data.cname %} COMMAND{% endif %}
```console
{{ controller_data.usage | replace: tabChar, "" | strip }}{% if controller_data.cname %} COMMAND{% endif %}
```

{% endif %}
Expand Down Expand Up @@ -116,27 +115,22 @@ For example uses of this command, refer to the [examples section](#examples) bel
</thead>
<tbody>
{% for option in alloptions %}

{% capture deprecated-badge %}{% if option.deprecated %}<a href="/engine/deprecated.md" target="_blank" class="_"><span class="badge badge-danger" data-toggle="tooltip" title="Read the deprecation reference (in a new window).">deprecated</span></a>{% endif %}{% endcapture %}
{% capture experimental-daemon-badge %}{% if option.experimental %}<a href="/engine/reference/commandline/dockerd.md#daemon-configuration-file" target="_blank" class="_"><span class="badge badge-warning" data-toggle="tooltip" title="Read about experimental daemon options (in a new window).">experimental (daemon)</span></a>{% endif %}{% endcapture %}
{% capture experimental-cli-badge %}{% if option.experimentalcli %}<a href="/engine/reference/commandline/cli.md#configuration-files" target="_blank" class="_"><span class="badge badge-warning" data-toggle="tooltip" title="Read about experimental CLI options (in a new window).">experimental (CLI)</span></a>{% endif %}{% endcapture %}
{% capture deprecated-badge %}{% if option.deprecated %}<a href="/engine/deprecated/" target="_blank" class="_"><span class="badge badge-danger" data-toggle="tooltip" title="Read the deprecation reference (in a new window).">deprecated</span></a>{% endif %}{% endcapture %}
{% capture experimental-daemon-badge %}{% if option.experimental %}<a href="/engine/reference/commandline/dockerd/#daemon-configuration-file" target="_blank" class="_"><span class="badge badge-warning" data-toggle="tooltip" title="Read about experimental daemon options (in a new window).">experimental (daemon)</span></a>{% endif %}{% endcapture %}
{% capture experimental-cli-badge %}{% if option.experimentalcli %}<a href="/engine/reference/commandline/cli/#configuration-files" target="_blank" class="_"><span class="badge badge-warning" data-toggle="tooltip" title="Read about experimental CLI options (in a new window).">experimental (CLI)</span></a>{% endif %}{% endcapture %}
{% capture min-api %}{% if option.min_api_version %}<a href="/engine/api/v{{ option.min_api_version }}/" target="_blank" class="_"><span class="badge badge-info" data-toggle="tooltip" ttitle="Open the {{ controller_data.min_api_version }} API reference (in a new window)">API {{ option.min_api_version }}+</span></a>{% endif %}{%endcapture%}
{% capture flag-orchestrator %}{% if option.swarm %}<span class="badge badge-info" data-toggle="tooltip" title="This option works for the Swarm orchestrator.">Swarm</span>{% endif %}{% if option.kubernetes %}<span class="badge badge-info" data-toggle="tooltip" title="This option works for the Kubernetes orchestrator.">Kubernetes</span>{% endif %}{% endcapture %}

{% capture all-badges %}{{ deprecated-badge }}{{ experimental-daemon-badge }}{{ experimental-cli-badge }}{{ min-api }}{{ flag-orchestrator }}{% endcapture %}

{% assign defaults-to-skip = "[],map[],false,0,0s,default,'',\"\"" | split: ',' %}
{% capture option-default %}{% if option.default_value %}{% unless defaults-to-skip contains option.default_value or defaults-to-skip == blank %}`{{ option.default_value }}`{% endunless %}{% endif %}{% endcapture %}
<tr>
<td markdown="span">`--{{ option.option }}{% if option.shorthand %} , -{{ option.shorthand }}{% endif %}`</td>
<td markdown="span">{{ option-default }}</td>
<td markdown="span">{% if all-badges != '' %}{{ all-badges | strip }}<br />{% endif %}{{ option.description | strip }}</td>
</tr>

{% endfor %} <!-- end for option -->
</tbody>
</table>

{% endif %} <!-- end if options -->

{% if controller_data.examples %}
Expand All @@ -145,25 +139,20 @@ For example uses of this command, refer to the [examples section](#examples) bel

{{ controller_data.examples }}

{% endif %}
{% else %}

The include.datafolder or include.datafile was not set.

{% endif %}

{% if controller_data.pname %}
{% unless controller_data.pname == include.datafile %}

## Parent command

{% capture parentfile %}{{ controller_data.plink | replace: ".yaml", "" | replace: "docker_","" }}{% endcapture %}
{% capture parentdatafile %}{{ controller_data.plink | replace: ".yaml", "" }}{% endcapture %}
{% capture parentfile %}{{ controller_data.plink | remove_first: ".yaml" | remove_first: "docker_" }}{% endcapture %}
{% capture parentdatafile %}{{ controller_data.plink | remove_first: ".yaml" }}{% endcapture %}
{% capture parentDesc %}{{ site.data[include.datafolder][parentdatafile].short }}{% endcapture %}

| Command | Description |
| ------- | ----------- |
| [{{ controller_data.pname }}]({{ parentfile }}) | {{ parentDesc }}|
| [{{ controller_data.pname }}]({{parentPath}}{{ parentfile }}/) | {{ parentDesc }}|

{% endunless %}
{% endif %}
Expand All @@ -181,9 +170,9 @@ The include.datafolder or include.datafile was not set.
</thead>
<tbody>
{% for command in controller_data.cname %}
{% capture dataFileName %}{{ command | strip | replace: " ","_" }}{% endcapture %}
{% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %}
<tr>
<td markdown="span">[{{ command }}]({{ dataFileName | replace: "docker_","" }}/)</td>
<td markdown="span">[{{ command }}]({{ parentPath }}{{ dataFileName | remove_first: "docker_" }}/)</td>
<td markdown="span">{{ site.data[include.datafolder][dataFileName].short }}</td>
</tr>
{% endfor %}
Expand All @@ -204,13 +193,68 @@ The include.datafolder or include.datafile was not set.
</thead>
<tbody>
{% for command in site.data[include.datafolder][parentdatafile].cname %}
{% capture dataFileName %}{{ command | strip | replace: " ","_" }}{% endcapture %}
{% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %}
<tr>
<td markdown="span">[{{ command }}]({{ dataFileName | replace: "docker_","" }}/)</td>
<td markdown="span">[{{ command }}]({{ parentPath }}{{ dataFileName | remove_first: "docker_" }}/)</td>
<td markdown="span">{{ site.data[include.datafolder][dataFileName].short }}</td>
</tr>
{% endfor %}
</tbody>
</table>

{% endunless %}

<script>
// This is a horrible hack, and cute little kittens are sacrificed every time it's run, so we
// need to remove it as soon as possible.
//
// Fix up links to markdown pages that weren't resolved by Jekyll (or the "jekyll-relative-links"
// plugin). This is a horrible hack, and should not rely on JavaScript (perhaps be re-implemented
// using Liquid). We need this hack to work around two bugs in the "jekyll-relative-links" plugin;
// 1. As reported in https://github.com/benbalter/jekyll-relative-links/issues/54, (relative) links
// to markdown pages in includes are not processed by Jekyll. This means that (for example) our
// reference pages (which use includes) contain broken links. We can work around this by modifying
// the markdown for those pages to use "absolute" "html" links (/link/to/other/page/#some-anchor),
// but doing so would render the links broken when viewed on GitHub. Instead, we're fixing them up
// here, hoping the bug will be fixed, and it's only temporarily.
// 2. As reported in https://github.com/benbalter/jekyll-relative-links/issues/61, (relative) links
// to markdown pages are not resolved if the link's caption/title is wrapped.
//
Array.prototype.forEach.call(document.querySelectorAll("section.section a:not(.nomunge)"), function (el) {
let href = el.getAttribute("href");
if (href.startsWith("/") || href.startsWith("#") || href.includes("://") || !href.includes('.md')) {
// Don't modify anchor links, absolute links, links to external websites,
// or links not pointing to a .md file; we assume those were
// resolved successfully by Jekyll.
return
}
if (href.startsWith("./")) {
href = href.substr(2)
}
if ("{{ page.name }}" !== "index.md") {
// For non-index pages, things are a bit hairy. For example, for /foo/bar/mypage.md, Jekyll
// will generate a page named /foo/bar/mypage/index.html. This means that all links relative
// to mypage.md expect those links to be relative to the /foo/bar/ directory, but end up
// being relative to /foo/bar/mypage/.
//
// For files "next to", or "below" this file, such as "file.md" or "nested/dir/file.md" we
// prepend the "parent-dir" to the URL.
//
// For links to files "up" the directory tree, we prepend
// "../" to the URL and have the browser handle this. For example, "../file.md" and "../../file.md"
// become "../../file.md" and "../../../file.md".
if (href.startsWith("../")) {
href = "../" + href
} else {
// Generate "parentPath" with Liquid, which is used below. Liquid's page.path (and page.dir)
// are relative to the _generated_ HTML page, not the source page, so we have to remove the
// last part of the path:
// {% raw %}{% assign parentPath = page.path | prepend: "/" | remove: page.name %}{% endraw %}
// {% assign parentPath = page.path | prepend: "/" | remove: page.name %}
href = "{{ parentPath}}" + href
}
}
// finally, we replace the .md extension for a slash, and update the link's href
el.setAttribute("href", href.replace(".md", "/"))
});
</script>
4 changes: 2 additions & 2 deletions _includes/content/compose-var-sub.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ string. In the example above, if `POSTGRES_VERSION` is not set, the value for
the `image` option is `postgres:`.

You can set default values for environment variables using a
[`.env` file](../env-file.md), which Compose automatically looks for. Values
[`.env` file](/compose/env-file/), which Compose automatically looks for. Values
set in the shell environment override those set in the `.env` file.

> Note when using docker stack deploy
Expand All @@ -28,7 +28,7 @@ set in the shell environment override those set in the `.env` file.
{: .important }

Both `$VARIABLE` and `${VARIABLE}` syntax are supported. Additionally when using
the [2.1 file format](compose-versioning.md#version-21), it is possible to
the [2.1 file format](/compose/compose-file/compose-versioning/#version-21), it is possible to
provide inline default values using typical shell syntax:

- `${VARIABLE:-default}` evaluates to `default` if `VARIABLE` is unset or
Expand Down
2 changes: 1 addition & 1 deletion _includes/content/ssh/ssh-overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[SSH](/glossary.md#SSH) is a secure protocol for accessing remote machines and applications. It
[SSH](/glossary/#SSH) is a secure protocol for accessing remote machines and applications. It
provides authentication and encrypts data communication over insecure networks.

These topics describe how to find existing SSH keys or generate new ones, and
Expand Down
8 changes: 4 additions & 4 deletions _includes/docker_ee.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| Capabilities | Docker Engine - Enterprise | Docker Enterprise |
|:---------------------------------------------------------------------|:-------------------------:|:----------------------------:|
| Container engine and built in orchestration, networking, security | {{green-check}} | {{green-check}} |
| [Certified infrastructure, plugins and ISV containers](../ee/supported-platforms/#docker-enterprise) | {{green-check}} | {{green-check}} |
| [Image management with Docker Trusted Registry security scanning](../ee/dtr/user/manage-images/scan-images-for-vulnerabilities/) | | {{green-check}} |
| [Container app management with Universal Control Plane](../ee/ucp/) | | {{green-check}} |
| [Developer solutions with Docker Desktop Enterprise](../ee/desktop/) | | {{green-check}} |
| [Certified infrastructure, plugins and ISV containers](/ee/supported-platforms/#docker-enterprise) | {{green-check}} | {{green-check}} |
| [Image management with Docker Trusted Registry security scanning](/ee/dtr/user/manage-images/scan-images-for-vulnerabilities/) | | {{green-check}} |
| [Container app management with Universal Control Plane](/ee/ucp/) | | {{green-check}} |
| [Developer solutions with Docker Desktop Enterprise](/desktop/enterprise/) | | {{green-check}} |
12 changes: 6 additions & 6 deletions _includes/ee-linux-install-reuse.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on {{ linux-dist-long }}:
Docker Engine - Community is _not_ supported on {{ linux-dist-long }}.
{% endif %}
{% if linux-dist == "centos" %}
For Docker Community Edition on {{ linux-dist-cap }}, see [Get Docker Engine - Community for CentOS](/engine/install/centos.md).
For Docker Community Edition on {{ linux-dist-cap }}, see [Get Docker Engine - Community for CentOS](/engine/install/centos/).
{% endif %}

{% elsif section == "find-ee-repo-url" %}
Expand Down Expand Up @@ -280,7 +280,7 @@ You only need to set up the repository once, after which you can install Docker
```

Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See
[Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow
[Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow
non-privileged users to run Docker commands.


Expand Down Expand Up @@ -351,7 +351,7 @@ To manually install Docker Enterprise, download the `.{{ package-format | downca
```

Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See
[Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow
[Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow
non-privileged users to run Docker commands.

</div>
Expand Down Expand Up @@ -394,7 +394,7 @@ To manually install Docker Enterprise, download the `.{{ package-format | downca
```

Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See
[Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow
[Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow
non-privileged users to run Docker commands.

</div>
Expand Down Expand Up @@ -444,7 +444,7 @@ To manually install Docker Enterprise, download the `.{{ package-format | downca
```

Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See
[Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow
[Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow
non-privileged users to run Docker commands.
{% endif %}

Expand Down Expand Up @@ -485,7 +485,7 @@ You must delete any edited configuration files manually.

{% elsif section == "linux-install-nextsteps" %}

- Continue to [Post-installation steps for Linux](/engine/install/linux-postinstall.md){: target="_blank" class="_" }
- Continue to [Post-installation steps for Linux](/engine/install/linux-postinstall/){: target="_blank" class="_" }

- Continue with user guides on [Universal Control Plane (UCP)](/ee/ucp/){: target="_blank" class="_" } and [Docker Trusted Registry (DTR)](/ee/dtr/){: target="_blank" class="_" }

Expand Down
2 changes: 1 addition & 1 deletion _includes/install-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ run Docker commands by default.
> **Note**:
>
> To install Docker without root privileges, see
> [Run the Docker daemon as a non-root user (Rootless mode)](/engine/security/rootless.md).
> [Run the Docker daemon as a non-root user (Rootless mode)](/engine/security/rootless/).
>
> Rootless mode is currently available as an experimental feature.

Expand Down
2 changes: 1 addition & 1 deletion _includes/kubernetes-mac-win.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ your workloads, in parallel, on Kubernetes, Swarm, and as standalone containers.
Enabling or disabling the Kubernetes server does not affect your other
workloads.

See [{{ product }} > Getting started](/docker-for-{{ platform }}/index.md#kubernetes) to
See [{{ product }} > Getting started](/docker-for-{{ platform }}/#kubernetes) to
enable Kubernetes and begin testing the deployment of your workloads on
Kubernetes.

Expand Down
Loading