Docker: disable “What’s next” adverts

Docker geese: “Honk honk buy our shit!”

On a client project today, I noticed that running docker exec -it tacks this advert on the end of the output:

What's next:
    Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug cl-django
    Learn more at https://docs.docker.com/go/debug-cli/

For example, when running some Django tests:

$ docker exec -it example ./manage.py test
Found 123 test(s).
Creating test database for alias 'default'...
................
Ran 40 tests in 5.847s

OK
Destroying test database for alias 'default'...

What's next:
    Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug cl-django
    Learn more at https://docs.docker.com/go/debug-cli/

That’s a rather unfriendly user experience. Thanks to this forum thread I found a way to turn these adverts (“hints”) off, by setting the DOCKER_CLI_HINTS environment variable to false:

export DOCKER_CLI_HINTS=false

Put that line in your shell startup file: ~/.bashrc for Bash, ~/.zshrc for Zsh, or similar.

This environment variable is poorly documented in Docker’s Desktop settings page:

Show CLI hints. Displays CLI hints and tips when running Docker commands in the CLI. This is turned on by default. To turn CLI hints on or off from the CLI, set DOCKER_CLI_HINTS to true or false respectively.

Fin

Sigh.

I should probably be moving to Podman instead, though I’m a little cautious that it may be incompatible with some of the client projects I work on.

May your terminal be a place of peace, quiet, and focus,

—Adam


😸😸😸 Check out my new book on using GitHub effectively, Boost Your GitHub DX! 😸😸😸


Subscribe via RSS, Twitter, Mastodon, or email:

One summary email a week, no spam, I pinky promise.

Related posts:

Tags: