Skip to content

Commit

Permalink
docs: use gh alert syntax for callouts
Browse files Browse the repository at this point in the history
Signed-off-by: David Karlsson <[email protected]>
  • Loading branch information
dvdksn committed Aug 16, 2024
1 parent bbce5a0 commit f1befab
Show file tree
Hide file tree
Showing 56 changed files with 101 additions and 193 deletions.
3 changes: 1 addition & 2 deletions docs/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,7 @@ Docker API v1.42 and up now ignores this option when set. Older versions of the
API continue to accept the option, but depending on the OCI runtime used, may
take no effect.

> **Note**
>
> [!NOTE]
> While not deprecated (yet) in Docker, the OCI runtime specification also
> deprecated the `memory.kmem.tcp.limit_in_bytes` option. When using `runc` as
> runtime, this option takes no effect. The linux kernel did not explicitly
Expand Down
9 changes: 3 additions & 6 deletions docs/extend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ plugins using Docker Engine.
For information about legacy (non-managed) plugins, refer to
[Understand legacy Docker Engine plugins](legacy_plugins.md).

> **Note**
>
> [!NOTE]
> Docker Engine managed plugins are currently not supported on Windows daemons.
## Installing and using a plugin
Expand All @@ -38,8 +37,7 @@ operation, such as creating a volume.
In the following example, you install the `sshfs` plugin, verify that it is
enabled, and use it to create a volume.

> **Note**
>
> [!NOTE]
> This example is intended for instructional purposes only. Once the volume is
> created, your SSH password to the remote host is exposed as plaintext when
> inspecting the volume. Delete the volume as soon as you are done with the
Expand Down Expand Up @@ -126,8 +124,7 @@ commands and options, see the
The `rootfs` directory represents the root filesystem of the plugin. In this
example, it was created from a Dockerfile:

> **Note**
>
> [!NOTE]
> The `/run/docker/plugins` directory is mandatory inside of the
> plugin's filesystem for Docker to communicate with the plugin.

Expand Down
3 changes: 1 addition & 2 deletions docs/extend/plugins_authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ Authorization plugins must follow the rules described in [Docker Plugin API](plu
Each plugin must reside within directories described under the
[Plugin discovery](plugin_api.md#plugin-discovery) section.

> **Note**
>
> [!NOTE]
> The abbreviations `AuthZ` and `AuthN` mean authorization and authentication
> respectively.
Expand Down
3 changes: 1 addition & 2 deletions docs/extend/plugins_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Docker exposes internal metrics based on the Prometheus format. Metrics plugins
enable accessing these metrics in a consistent way by providing a Unix
socket at a predefined path where the plugin can scrape the metrics.

> **Note**
>
> [!NOTE]
> While the plugin interface for metrics is non-experimental, the naming of the
> metrics and metric labels is still considered experimental and may change in a
> future version.
Expand Down
3 changes: 1 addition & 2 deletions docs/extend/plugins_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ provide the Docker Daemon with writeable paths on the host filesystem. The Docke
daemon provides these paths to containers to consume. The Docker daemon makes
the volumes available by bind-mounting the provided paths into the containers.

> **Note**
>
> [!NOTE]
> Volume plugins should *not* write data to the `/var/lib/docker/` directory,
> including `/var/lib/docker/volumes`. The `/var/lib/docker/` directory is
> reserved for Docker.
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/commandline/config_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Creates a config using standard input or from a file for the config content.

For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).

> **Note**
>
> [!NOTE]
> This is a cluster management command, and must be executed on a Swarm
> manager node. To learn about managers and workers, refer to the
> [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/commandline/config_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ describes all the details of the format.

For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).

> **Note**
>
> [!NOTE]
> This is a cluster management command, and must be executed on a Swarm
> manager node. To learn about managers and workers, refer to the
> [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/commandline/config_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Run this command on a manager node to list the configs in the Swarm.

For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).

> **Note**
>
> [!NOTE]
> This is a cluster management command, and must be executed on a Swarm
> manager node. To learn about managers and workers, refer to the
> [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/commandline/config_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Removes the specified configs from the Swarm.

For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/).

> **Note**
>
> [!NOTE]
> This is a cluster management command, and must be executed on a Swarm
> manager node. To learn about managers and workers, refer to the
> [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
Expand All @@ -32,8 +31,7 @@ $ docker config rm my_config
sapth4csdo5b6wz2p5uimh5xg
```

> **Warning**
>
> [!WARNING]
> This command doesn't ask for confirmation before removing a config.
{ .warning }

Expand Down
6 changes: 2 additions & 4 deletions docs/reference/commandline/container_attach.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Use `docker attach` to attach your terminal's standard input, output, and error
ID or name. This lets you view its output or control it interactively, as
though the commands were running directly in your terminal.

> **Note**
>
> [!NOTE]
> The `attach` command displays the output of the container's `ENTRYPOINT` and
> `CMD` process. This can appear as if the attach command is hung when in fact
> the process may simply not be writing any output at that time.
Expand All @@ -39,8 +38,7 @@ container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to
the container. If the container was run with `-i` and `-t`, you can detach from
a container and leave it running using the `CTRL-p CTRL-q` key sequence.

> **Note**
>
> [!NOTE]
> A process running as PID 1 inside a container is treated specially by
> 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.
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/commandline/container_kill.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ set through `--signal` may be non-terminal, depending on the container's main
process. For example, the `SIGHUP` signal in most cases will be non-terminal,
and the container will continue running after receiving the signal.

> **Note**
>
> [!NOTE]
> `ENTRYPOINT` and `CMD` in the *shell* form run as a child process of
> `/bin/sh -c`, which does not pass signals. This means that the executable is
> not the container’s PID 1 and does not receive Unix signals.
Expand Down
51 changes: 18 additions & 33 deletions docs/reference/commandline/container_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ running processes in that namespace. By default, all containers, including
those with `--network=host`, have their own UTS namespace. Setting `--uts` to
`host` results in the container using the same UTS namespace as the host.

> **Note**
>
> [!NOTE]
> Docker disallows combining the `--hostname` and `--domainname` flags with
> `--uts=host`. This is to prevent containers running in the host's UTS
> namespace from attempting to change the hosts' configuration.
Expand Down Expand Up @@ -350,8 +349,7 @@ In other words, the container can then do almost everything that the host can
do. This flag exists to allow special use-cases, like running Docker within
Docker.

> **Warning**
>
> [!WARNING]
> Use the `--privileged` flag with caution.
> A container with `--privileged` is not a securely sandboxed process.
> Containers in this mode can get a root shell on the host
Expand Down Expand Up @@ -533,8 +531,7 @@ host. You can also specify `udp` and `sctp` ports. The [Networking overview
page](https://docs.docker.com/network/) explains in detail how to publish ports
with Docker.

> **Note**
>
> [!NOTE]
> If you don't specify an IP address (i.e., `-p 80:80` instead of `-p
> 127.0.0.1:80:80`) when publishing a container's ports, Docker publishes the
> port on all interfaces (address `0.0.0.0`) by default. These ports are
Expand Down Expand Up @@ -715,8 +712,7 @@ or name. For `overlay` networks or custom plugins that support multi-host
connectivity, containers connected to the same multi-host network but launched
from different Engines can also communicate in this way.

> **Note**
>
> [!NOTE]
> The default bridge network only allows containers to communicate with each other using
> internal IP addresses. User-created bridge networks provide DNS resolution between
> containers using container names.
Expand Down Expand Up @@ -784,8 +780,7 @@ $ docker network create --subnet 192.0.2.0/24 my-net
$ docker run -itd --network=name=my-net,\"driver-opt=com.docker.network.endpoint.sysctls=net.ipv4.conf.IFNAME.log_martians=1,net.ipv4.conf.IFNAME.forwarding=0\",ip=192.0.2.42 busybox
```

> **Note**
>
> [!NOTE]
> Network drivers may restrict the sysctl settings that can be modified and, to protect
> the operation of the network, new restrictions may be added in the future.
Expand Down Expand Up @@ -912,8 +907,7 @@ $ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk /dev/xvdc
fdisk: unable to open /dev/xvdc: Operation not permitted
```

> **Note**
>
> [!NOTE]
> The `--device` option cannot be safely used with ephemeral devices. You shouldn't
> add block devices that may be removed to untrusted containers with `--device`.
Expand All @@ -935,15 +929,13 @@ ports on the host visible in the container.
PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.microsoft.com/windows/servercore:ltsc2019
```

> **Note**
>
> [!NOTE]
> The `--device` option is only supported on process-isolated Windows containers,
> and produces an error if the container isolation is `hyperv`.
#### CDI devices

> **Note**
>
> [!NOTE]
> The CDI feature is experimental, and potentially subject to change.
> CDI is currently only supported for Linux containers.
Expand Down Expand Up @@ -1010,8 +1002,7 @@ ID once the container has finished running.
$ cat somefile | docker run -i -a stdin mybuilder dobuild
```

> **Note**
>
> [!NOTE]
> A process running as PID 1 inside a container is treated specially by
> 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.
Expand Down Expand Up @@ -1124,16 +1115,16 @@ $ docker run -d --device-cgroup-rule='c 42:* rmw' --name my-container my-image
Then, a user could ask `udev` to execute a script that would `docker exec my-container mknod newDevX c 42 <minor>`
the required device when it is added.

> **Note**: You still need to explicitly add initially present devices to the
> [!NOTE]
> You still need to explicitly add initially present devices to the
> `docker run` / `docker create` command.
### <a name="gpus"></a> Access an NVIDIA GPU

The `--gpus` flag allows you to access NVIDIA GPU resources. First you need to
install the [nvidia-container-runtime](https://nvidia.github.io/nvidia-container-runtime/).

> **Note**
>
> [!NOTE]
> You can also specify a GPU as a CDI device with the `--device` flag, see
> [CDI devices](#cdi-devices).
Expand Down Expand Up @@ -1246,8 +1237,7 @@ the container and remove the file system when the container exits, use the
--rm=false: Automatically remove the container when it exits
```

> **Note**
>
> [!NOTE]
> If you set the `--rm` flag, Docker also removes the anonymous volumes
> associated with the container when the container is removed. This is similar
> to running `docker rm -v my-container`. Only volumes that are specified
Expand Down Expand Up @@ -1345,14 +1335,12 @@ $ docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n"
1024
```

> **Note**
>
> [!NOTE]
> If you don't provide a hard limit value, Docker uses the soft limit value
> for both values. If you don't provide any values, they are inherited from
> the default `ulimits` set on the daemon.
> **Note**
>
> [!NOTE]
> The `as` option is deprecated.
> In other words, the following script is not supported:
>
Expand Down Expand Up @@ -1417,8 +1405,7 @@ the same content between containers.
$ docker run --security-opt label=level:s0:c100,c200 -it fedora bash
```

> **Note**
>
> [!NOTE]
> Automatic translation of MLS labels isn't supported.
To disable the security labeling for a container entirely, you can use
Expand All @@ -1436,8 +1423,7 @@ that's only allowed to listen on Apache ports:
$ docker run --security-opt label=type:svirt_apache_t -it ubuntu bash
```

> **Note**
>
> [!NOTE]
> You would have to write policy defining a `svirt_apache_t` type.
To prevent your container processes from gaining additional privileges, you can
Expand Down Expand Up @@ -1558,8 +1544,7 @@ network namespace, run this command:
$ docker run --sysctl net.ipv4.ip_forward=1 someimage
```

> **Note**
>
> [!NOTE]
> Not all sysctls are namespaced. Docker does not support changing sysctls
> inside of a container that also modify the host system. As the kernel
> evolves we expect to see more sysctls become namespaced.
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/commandline/container_stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ containers do not return any data.
If you need more detailed information about a container's resource usage, use
the `/containers/(id)/stats` API endpoint.

> **Note**
>
> [!NOTE]
> On Linux, the Docker CLI reports memory usage by subtracting cache usage from
> the total memory usage. The API does not perform such a calculation but rather
> provides the total memory usage and the amount from the cache so that clients
Expand All @@ -41,8 +40,7 @@ the `/containers/(id)/stats` API endpoint.
> field. On cgroup v2 hosts, the cache usage is defined as the value of
> `inactive_file` field.
> **Note**
>
> [!NOTE]
> The `PIDS` column contains the number of processes and kernel threads created
> by that container. Threads is the term used by Linux kernel. Other equivalent
> terms are "lightweight process" or "kernel task", etc. A large number in the
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/commandline/container_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ options on a running or a stopped container. On kernel version older than
4.6, you can only update `--kernel-memory` on a stopped container or on
a running container with kernel memory initialized.

> **Warning**
>
> [!WARNING]
> The `docker update` and `docker container update` commands are not supported
> for Windows containers.
{ .warning }
Expand Down Expand Up @@ -78,8 +77,7 @@ running container only if the container was started with `--kernel-memory`.
If the container was started without `--kernel-memory` you need to stop
the container before updating kernel memory.

> **Note**
>
> [!NOTE]
> The `--kernel-memory` option has been deprecated since Docker 20.10.
For example, if you started a container with this command:
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/commandline/container_wait.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Block until one or more containers stop, then print their exit codes

<!---MARKER_GEN_END-->

> **Note**
>
> [!NOTE]
> `docker wait` returns `0` when run against a container which had already
> exited before the `docker wait` command was run.
Expand Down
Loading

0 comments on commit f1befab

Please sign in to comment.