Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions _includes/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ your client and daemon API versions.
{% endcapture %}{{ command-orchestrator }}


{% if controller_data.aliases %}
{% assign aliases = controller_data.aliases | split: ', ' %}
### Aliases

The following commands are equivalent and redirect here:
{% for alias in aliases %}
{%- assign fname = alias | remove_first: "docker " | replace: " ", "_" -%}
- [{{ alias }}](/engine/reference/commandline/{{ fname }}/)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I constructed the URLs for each alias here, but this won't work because we don't have redirects for all aliases.

Some options;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this list does not filter out the "current" page from the list; perhaps that's what we want, or perhaps we want to exclude the "current alias" here (not sure what's best)

I should add here tha

  • (if I did it right everywhere), the first "alias" in the list is considered the "canonical", and ultimately should be the page we redirect them all to, but content would still have to be moved (and we need to review if all those are indeed what we consider the "canonical")
  • "build" is still a tricky one; docker image build is probably the canonical one, but docker buildx build can in some cases provide additional options / ever-so-slightly different behavior, so may not be an "exact" alias.
  • ^^ documentation is also still spread between docker build and docker buildx build

{% endfor -%}
{% endif %}
{% if controller_data.usage %}

## Usage
Expand Down