When running Docker Scout from the CLI in a Windows + WSL2 setup, I keep getting prompted to log in, even after a successful docker login. Has anyone else run into this issue?
Log in to Docker from WSL2 using a Personal Access Token:
docker login -u user
Pull an image from my personal repository on Docker Hub:
docker pull liviu152/docker-scout:v1
Try to run Docker Scout against that image:
docker scout quickview liviu152/docker-scout:v1
Actual behavior
Docker Scout keeps asking for login and does not reuse the successful Docker CLI authentication.
Log in with your Docker ID or email address to use docker scout.
If you don't have a Docker ID, head over to https://hub.docker.com to
create one. You can log in with your password or a Personal Access Token (PAT)
by running docker login.
Using a limited-scope PAT grants better security and is required for organizations
using SSO. Learn more at https://docs.docker.com/go/access-tokens/
You can also log in using Docker Desktop.
This happens even though:
docker login succeeds
the image can be pulled successfully
Docker CLI reports the correct logged-in username
Expected behavior
Docker Scout should reuse the existing Docker CLI authentication context and allow scanning from WSL2 CLI without requiring Docker Desktop login interaction.
Additional context
Authentication was done with a Personal Access Token (PAT)
The image is hosted in my personal repository: liviu152/docker-scout:v1
The image can be pulled successfully from WSL2
Docker Scout works through Docker Desktop GUI, but not from WSL2 CLI
The output of the client version can’t be right. Are you sure wsl integration is enabled for this distro, and there is no docker other docker installation inside the distro? It appears to be the case.
Hi, many thanks for the quick reply. Indeed you feeling was right. First I’ve tried to install docker scout plug-in manually in WSL2 $HOME/.docker/scout, as mentioned here, then I went for Docker Desktop solution, without removing the first plug-in installation.
After removing the first installation from HOME/.docker/cli-plugins/docker-scout, now the plugins are pointing all to Docker Desktop and Docker Scout works from WSL2
But still, can be Scout or other plug-ins used without having Docker Desktop ?
The Docker Scout CLI plugin comes pre-installed with Docker Desktop.
If you run Docker Engine without Docker Desktop, Docker Scout doesn’t come pre-installed, but you can install it as a standalone binary.
I just installed the scout cli plugin (v1.20.3) on a standalone docker-ce (v29.3.1) installation:
curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh -o install-scout.sh
sh install-scout.sh
I can run docker scout cves alpine:latest.
Then I tested with Docker Desktop. The pre-installed scout cli plugin work like a charm. After installing the update with the commands from above, the cli plugin gives me the same error you see.
After removing the self-installed plugin version again with rm ~/.docker/cli-plugins/docker-scout, the pre-installed plugin is used and it works again.
Is there a link between docker service and scout plugin ? Or better said, a limitation of docker scout ?
Apparently, the Docker Scout CLI plugin (v1.20.3) can work with standalone Docker CE (v29.3.1) only while the Docker daemon is not running. Once the daemon is started, the authentication prompt appears again.
I would have thought it’s maybe because of the credStore configured in ~/.docker/config.json.
But somehow Docker Desktop gets detected (regardless whether it’s running or not), even though I tried in a Distro where WSL-integration was never enabled for.
During my test in an Ubuntu VM, docker-ce was running.
It was not in a wsl distribution. For me inside WSL Distro it fails regardless Docker Desktop is running or not. Regardless whether the distro has or had WSL-integration enabled at one point, or never.