Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[25.0 backport] docs: fix broken links to alias pages #4804

Merged
Merged
Show file tree
Hide file tree
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
111 changes: 7 additions & 104 deletions docs/reference/commandline/cli.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/reference/commandline/container_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ $ cat somefile | docker run -i -a stdin mybuilder dobuild
> Linux: it ignores any signal with the default action. So, the process
> doesn't terminate on `SIGINT` or `SIGTERM` unless it's coded to do so.

See also [the `docker cp` command](cp.md).
See also [the `docker cp` command](container_cp.md).

### <a name="interactive"></a> Keep STDIN open (-i, --interactive)

Expand Down Expand Up @@ -1097,8 +1097,8 @@ This runs the `redis` container with a restart policy of **always**.
If the container exits, Docker restarts it.

When a restart policy is active on a container, it shows as either `Up` or
`Restarting` in [`docker ps`](ps.md). It can also be useful to use [`docker
events`](events.md) to see the restart policy in effect.
`Restarting` in [`docker ps`](container_ls.md). It can also be useful to use
[`docker events`](system_events.md) to see the restart policy in effect.

An increasing delay (double the previous delay, starting at 100 milliseconds)
is added before each restart to prevent flooding the server. This means the
Expand Down Expand Up @@ -1129,8 +1129,8 @@ restart limit is only valid for the **on-failure** policy.
#### Inspect container restarts

The number of (attempted) restarts for a container can be obtained using the
[`docker inspect`](commandline/inspect.md) command. For example, to get the
number of restarts for container "my-container";
[`docker inspect`](inspect.md) command. For example, to get the number of
restarts for container "my-container";

```console
$ docker inspect -f "{{ .RestartCount }}" my-container
Expand Down
86 changes: 86 additions & 0 deletions docs/reference/commandline/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# docker

<!---MARKER_GEN_START-->
The base command for the Docker CLI.

### Subcommands

| Name | Description |
|:------------------------------|:------------------------------------------------------------------------------|
| [`attach`](attach.md) | Attach local standard input, output, and error streams to a running container |
| [`build`](build.md) | Build an image from a Dockerfile |
| [`builder`](builder.md) | Manage builds |
| [`checkpoint`](checkpoint.md) | Manage checkpoints |
| [`commit`](commit.md) | Create a new image from a container's changes |
| [`config`](config.md) | Manage Swarm configs |
| [`container`](container.md) | Manage containers |
| [`context`](context.md) | Manage contexts |
| [`cp`](cp.md) | Copy files/folders between a container and the local filesystem |
| [`create`](create.md) | Create a new container |
| [`diff`](diff.md) | Inspect changes to files or directories on a container's filesystem |
| [`events`](events.md) | Get real time events from the server |
| [`exec`](exec.md) | Execute a command in a running container |
| [`export`](export.md) | Export a container's filesystem as a tar archive |
| [`history`](history.md) | Show the history of an image |
| [`image`](image.md) | Manage images |
| [`images`](images.md) | List images |
| [`import`](import.md) | Import the contents from a tarball to create a filesystem image |
| [`info`](info.md) | Display system-wide information |
| [`inspect`](inspect.md) | Return low-level information on Docker objects |
| [`kill`](kill.md) | Kill one or more running containers |
| [`load`](load.md) | Load an image from a tar archive or STDIN |
| [`login`](login.md) | Log in to a registry |
| [`logout`](logout.md) | Log out from a registry |
| [`logs`](logs.md) | Fetch the logs of a container |
| [`manifest`](manifest.md) | Manage Docker image manifests and manifest lists |
| [`network`](network.md) | Manage networks |
| [`node`](node.md) | Manage Swarm nodes |
| [`pause`](pause.md) | Pause all processes within one or more containers |
| [`plugin`](plugin.md) | Manage plugins |
| [`port`](port.md) | List port mappings or a specific mapping for the container |
| [`ps`](ps.md) | List containers |
| [`pull`](pull.md) | Download an image from a registry |
| [`push`](push.md) | Upload an image to a registry |
| [`rename`](rename.md) | Rename a container |
| [`restart`](restart.md) | Restart one or more containers |
| [`rm`](rm.md) | Remove one or more containers |
| [`rmi`](rmi.md) | Remove one or more images |
| [`run`](run.md) | Create and run a new container from an image |
| [`save`](save.md) | Save one or more images to a tar archive (streamed to STDOUT by default) |
| [`search`](search.md) | Search Docker Hub for images |
| [`secret`](secret.md) | Manage Swarm secrets |
| [`service`](service.md) | Manage Swarm services |
| [`stack`](stack.md) | Manage Swarm stacks |
| [`start`](start.md) | Start one or more stopped containers |
| [`stats`](stats.md) | Display a live stream of container(s) resource usage statistics |
| [`stop`](stop.md) | Stop one or more running containers |
| [`swarm`](swarm.md) | Manage Swarm |
| [`system`](system.md) | Manage Docker |
| [`tag`](tag.md) | Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE |
| [`top`](top.md) | Display the running processes of a container |
| [`trust`](trust.md) | Manage trust on Docker images |
| [`unpause`](unpause.md) | Unpause all processes within one or more containers |
| [`update`](update.md) | Update configuration of one or more containers |
| [`version`](version.md) | Show the Docker version information |
| [`volume`](volume.md) | Manage volumes |
| [`wait`](wait.md) | Block until one or more containers stop, then print their exit codes |


### Options

| Name | Type | Default | Description |
|:--------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
| `--config` | `string` | `/root/.docker` | Location of client config files |
| `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) |
| `-D`, `--debug` | | | Enable debug mode |
| `-H`, `--host` | `list` | | Daemon socket to connect to |
| `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) |
| `--tls` | | | Use TLS; implied by --tlsverify |
| `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA |
| `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file |
| `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file |
| `--tlsverify` | | | Use TLS and verify the remote |


<!---MARKER_GEN_END-->

2 changes: 1 addition & 1 deletion docs/reference/commandline/image_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ $ docker build -t vieux/apache:2.0 .
This examples builds in the same way as the previous example, but it then tags the resulting
image. The repository name will be `vieux/apache` and the tag `2.0`.

[Read more about valid tags](tag.md).
[Read more about valid tags](image_tag.md).

You can apply multiple tags to an image. For example, you can apply the `latest`
tag to a newly built image and add another tag that references a specific
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/image_pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Status: Downloaded newer image for debian:bookworm
docker.io/library/debian:bookworm
```

To see which images are present locally, use the [`docker images`](images.md)
To see which images are present locally, use the [`docker images`](image_ls.md)
command:

```console
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/commandline/image_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Upload an image to a registry
Use `docker image push` to share your images to the [Docker Hub](https://hub.docker.com)
registry or to a self-hosted one.

Refer to the [`docker image tag`](tag.md) reference for more information about valid
image and tag names.
Refer to the [`docker image tag`](image_tag.md) reference for more information
about valid image and tag names.

Killing the `docker image push` process, for example by pressing `CTRL-c` while it is
running in a terminal, terminates the push operation.
Expand All @@ -46,9 +46,9 @@ this via the `--max-concurrent-uploads` daemon option. See the

### Push a new image to a registry

First save the new image by finding the container ID (using [`docker container ls`](ps.md))
and then committing it to a new image name. Note that only `a-z0-9-_.` are
allowed when naming images:
First save the new image by finding the container ID (using [`docker container
ls`](container_ls.md)) and then committing it to a new image name. Note that
only `a-z0-9-_.` are allowed when naming images:

```console
$ docker container commit c16378f943fe rhel-httpd:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/image_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ removed.

This does not remove images from a registry. You cannot remove an image of a
running container unless you use the `-f` option. To see all images on a host
use the [`docker image ls`](images.md) command.
use the [`docker image ls`](image_ls.md) command.

## Examples

Expand Down
9 changes: 0 additions & 9 deletions scripts/docs/generate-md.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ export GO111MODULE=auto

function clean {
rm -rf "$buildir"
if [ -f "$(pwd)/docs/reference/commandline/docker.md" ]; then
mv "$(pwd)/docs/reference/commandline/docker.md" "$(pwd)/docs/reference/commandline/cli.md"
fi
}

buildir=$(mktemp -d -t docker-cli-docsgen.XXXXXXXXXX)
Expand All @@ -32,12 +29,6 @@ trap clean EXIT
go build -mod=vendor -modfile=vendor.mod -tags docsgen -o /tmp/docsgen ./docs/generate/generate.go
)

# yaml generation on docs repo needs the cli.md file: https://github.com/docker/cli/pull/3924#discussion_r1059986605
# but markdown generation docker.md atm. While waiting for a fix in cli-docs-tool
# we need to first move the cli.md file to docker.md, do the generation and
# then move it back in trap handler.
mv "$(pwd)/docs/reference/commandline/cli.md" "$(pwd)/docs/reference/commandline/docker.md"

(
set -x
/tmp/docsgen --formats md --source "$(pwd)/docs/reference/commandline" --target "$(pwd)/docs/reference/commandline"
Expand Down
Loading