How to enable experimental Docker CLI features
There are a couple of ways to solve this problem:
Specify the environment variable
export DOCKER_CLI_EXPERIMENTAL=enabled
This provides a temporary environment for testing the experimental features without having to commit to it's usage.
Docker config file
Add
"experimental": "enabled"
to~/.docker/config.json
(default location) at the beginning of the file and not at the end (important detail)NOTE: The Docker config file only appears after you have run
docker login
for the first time. This is the best option, if you wish to permanently enable experimental mode.
You may also use an experimental feature once without exporting a variable. Like typing command with docker command:DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect hello-world
In this case, you will not need to unset variable if needed.