So first use
docker scan --login
and then
docker scan image_name
Can I use it without login ?
Share and learn in the Docker community.
So first use
docker scan --login
and then
docker scan image_name
Can I use it without login ?
Since you are trying to use a token and the docker scan --help says:
--login Authenticate to the scan provider using an optional token (with --token), or web base token if empty
you need --login and --token with its argument but not the image you want to scan.
Let’s see the help of the token option:
--token string Authentication token to login to the third party scanning provider
Do you want to login to a third party scanning provider?
I am not sure I understand the question. I assume you saw the message when you tried without login:
failed to get DockerScanID: You need to be logged in to Docker Hub to use the scan feature.
So “you need to be logged in”