Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit f4de9d9

Browse files
authored
Merge pull request #2120 from thaJeztah/19.03_backport_experimental_note
[19.03 backport] backport docs changes Upstream-commit: 73d513e56a4f3ef8a6f858c309777bf9c6cfd7c4 Component: cli
2 parents 0123322 + 5f0af88 commit f4de9d9

1 file changed

Lines changed: 55 additions & 15 deletions

File tree

  • components/cli/docs/reference/commandline

components/cli/docs/reference/commandline/cli.md

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,43 @@ variables.
9696
### Configuration files
9797

9898
By default, the Docker command line stores its configuration files in a
99-
directory called `.docker` within your `$HOME` directory. However, you can
100-
specify a different location via the `DOCKER_CONFIG` environment variable
101-
or the `--config` command line option. If both are specified, then the
102-
`--config` option overrides the `DOCKER_CONFIG` environment variable.
103-
For example:
104-
105-
docker --config ~/testconfigs/ ps
106-
107-
Instructs Docker to use the configuration files in your `~/testconfigs/`
108-
directory when running the `ps` command.
99+
directory called `.docker` within your `$HOME` directory.
109100

110101
Docker manages most of the files in the configuration directory
111102
and you should not modify them. However, you *can modify* the
112103
`config.json` file to control certain aspects of how the `docker`
113104
command behaves.
114105

115-
Currently, you can modify the `docker` command behavior using environment
106+
You can modify the `docker` command behavior using environment
116107
variables or command-line options. You can also use options within
117-
`config.json` to modify some of the same behavior. When using these
118-
mechanisms, you must keep in mind the order of precedence among them. Command
119-
line options override environment variables and environment variables override
120-
properties you specify in a `config.json` file.
108+
`config.json` to modify some of the same behavior. If an environment variable
109+
and the `--config` flag are set, the flag takes precedent over the environment
110+
variable. Command line options override environment variables and environment
111+
variables override properties you specify in a `config.json` file.
112+
113+
114+
#### Change the `.docker` directory
115+
116+
To specify a different directory, use the `DOCKER_CONFIG`
117+
environment variable or the `--config` command line option. If both are
118+
specified, then the `--config` option overrides the `DOCKER_CONFIG` environment
119+
variable. The example below overrides runs the `docker ps` command using a
120+
`config.json` file located in the `~/testconfigs/` directory.
121+
122+
```bash
123+
$ docker --config ~/testconfigs/ ps
124+
```
125+
126+
This flag only applies to whatever command is being ran. For persistent
127+
configuration, you can set the `DOCKER_CONFIG` environment variable in your
128+
shell (e.g. `~/.profile` or `~/.bashrc`). The example below sets the new
129+
directory to be `HOME/newdir/.docker`.
130+
131+
```bash
132+
echo export DOCKER_CONFIG=$HOME/newdir/.docker > ~/.profile
133+
```
134+
135+
#### `config.json` properties
121136

122137
The `config.json` file stores a JSON encoding of several properties:
123138

@@ -265,6 +280,31 @@ Following is a sample `config.json` file:
265280
{% endraw %}
266281
```
267282

283+
### Experimental features
284+
285+
Experimental features provide early access to future product functionality.
286+
These features are intended only for testing and feedback as they may change
287+
between releases without warning or can be removed entirely from a future
288+
release.
289+
290+
> Experimental features must not be used in production environments.
291+
{: .warning }
292+
293+
To enable experimental features, edit the `config.json` file and set
294+
`experimental` to `enabled`. The example below enables experimental features
295+
in a `config.json` file that already enables a debug feature.
296+
297+
```json
298+
{
299+
"experimental": "enabled",
300+
"debug": true
301+
}
302+
```
303+
304+
You can also enable experimental features from the Docker Desktop menu. See the
305+
[Docker Desktop Getting Started page](https://docs.docker.com/docker-for-mac#experimental-features)
306+
for more information.
307+
268308
### Notary
269309

270310
If using your own notary server and a self-signed certificate or an internal

0 commit comments

Comments
 (0)