Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable experimental Docker CLI features

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?

like image 978
Zak Avatar asked Sep 14 '19 17:09

Zak


People also ask

How do I enable experimental features in docker?

Docker experimental features can be enabled by adding an /etc/docker/daemon. json with {"experimental": true} on the Remote Docker instance and restarting the daemon. Be sure to set a Docker version that supports the functionality you are looking to make use of. If enabled, the command will print a value of true .

What does docker CLI command do?

Docker CLI management commands start with docker , then a space, then the management category, then a space, and then the command. For example, docker container stop stops a container. A command referring to a specific container or image requires the name or id of that container or image.

What is docker CLI client?

The Docker client provides a command line interface (CLI) that allows you to issue build, run, and stop application commands to a Docker daemon. The main purpose of the Docker Client is to provide a means to direct the pull of images from a registry and to have it run on a Docker host.


1 Answers

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.

like image 76
Zak Avatar answered Nov 04 '22 04:11

Zak