How to enable experimental Docker CLI features

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.