如何启用实验性Docker CLI功能 [英] How to enable experimental Docker CLI features

查看:1340
本文介绍了如何启用实验性Docker CLI功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 docker manifest inspect<图像名称> ,但是Docker CLI表示...

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

考虑到Docker文档的丰富性,很难找到这个简单的问题。

Considering the wealth of Docker documentation, this simple question is surprisingly difficult to search for.

如何启用实验性CLI功能?

How do I enable experimental CLI features?

推荐答案

有两种方法可以解决此问题:

There are a couple of ways to solve this problem:


  1. 指定环境变量

  1. Specify the environment variable

export DOCKER_CLI_EXPERIMENTAL =已启用

这为测试实验性功能提供了一个临时环境,而无需承诺其使用。

This provides a temporary environment for testing the experimental features without having to commit to it's usage.

Docker配置文件

Docker config file

添加实验性:已启用 〜/ .docker / config.json (默认位置)位于文件开头,而不是文件末尾(重要细节)

Add "experimental": "enabled" to ~/.docker/config.json (default location) at the beginning of the file and not at the end (important detail)


注意:仅当您运行 docker login 后,才会显示Docker配置文件
这是最好的选择,如果您想永久启用实验模式。

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.


这篇关于如何启用实验性Docker CLI功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆