docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
957 stars 255 forks source link

feat: display docker scout hints on build and pull #2252

Closed eunomie closed 1 year ago

eunomie commented 1 year ago

What I did

On docker build and docker pull commands, display a hint to docker scout quickview.

Hints are enabled by default. To disable them:

In case of build, if --push, --progress or --output flag are used, hints are not displayed to keep it working on main (and less advanced) case.

There's no hint for buildx build.

In case of a docker build the docker scout quickview command doesn't need an argument as it will take the most recently built image by default. In case of a docker pull the pulled image is extracted from the command arguments.

The output already handles plain/tty display:

image

Related issue

https://github.com/docker/team-ssc-dev-features/issues/306

(not mandatory) A picture of a cute animal, if possible in relation with what you did bela-bako-CT0FXtDtYII-unsplash

eunomie commented 1 year ago

I updated some things:

eunomie commented 1 year ago

Also added a CliHintsEnabled() that can be used if we introduce more hints