That image on Docker Hub contains documentation for how to use it:
To use the container simply run: docker run -e ANCHORE_CLI_URL=<my engine endpoint>/v1/ -it anchore/engine-cli
From the shell you can now use 'anchore-cli': anchore-cli system
status to get system status anchore-cli image list to list images
anchore-cli image add <img>
to add a new image for analysis
anchore-cli evaluate check <img>
to get the policy evaluation for an
image.
So you should be able to run commands like:
docker run -it --rm anchore/engine-cli anchore-cli image add XXXXX:"image-name"
E.g.
$ docker run -it --rm anchore/engine-cli anchore-cli image --help
Usage: anchore-cli image [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
add Add an image
content Get contents of image
del Delete an image
get Get an image
import Import an image from anchore scanner export
list List all images
metadata Get metadata about an image
vuln Get image vulnerabilities
wait Wait for an image to analyze
However, I'd note that this image was last pushed 2 years ago, and the GitHub repo for the project makes no mention of docker images pushed to GHCR or Docker Hub. All installation options supported by the project involve installing it locally on your machine.