How to enable experimental Docker CLI features

半腔热情 提交于 2020-02-25 04:12:09

问题


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:

  1. 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.

  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!