问题
I'm trying to use docker manifest inspect <image name>
, but the Docker CLI says...
$ docker manifest inspect node
docker manifest inspect is only supported on a Docker cli with experimental cli features enabled
Considering the wealth of Docker documentation, this simple question is surprisingly difficult to search for.
How do I enable experimental CLI features?
回答1:
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.
来源:https://stackoverflow.com/questions/57937733/how-to-enable-experimental-docker-cli-features