If you look at the log it clearly shows that docker info is unable to contact the docker pipe
docker run --rm -v \\.\pipe\docker_engine:\\.\pipe\docker_engine appveyor-docker-cli-test docker info
Debug Mode: false
ERROR: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/info: open //./pipe/docker_engine: Access is denied. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
errors pretty printing info
Not specific to appveyor, but I found myself in this thread and figured I'd post to possibly help others. Here's a setup I got around in Windows Server 2016 using docker commands in a Jenkins slave/agent on this node. Instead of running Jenkins under the default Local System account I had to switch it to use a Jenkins user account I created in windows. For context, the Jenkins agent on this server ran from a scheduled task as this user and the windows service for Jenkins does too.
Docker version: 19.03.5
Windows server based off Windows_Server-2016-English-Full-ECS_Optimized-2020.04.16 AWS image.
Gist of the steps I had to do:
1. Created a docker and docker-users group in windows.
2. Granted log on as batch to Jenkins user account for the scheduled task to run at startup.
3. Added the new Jenkins user to docker and docker-users groups.
4. Specified "group": "docker" in docker daemon.json.
5. Make sure to restart the tasks and services involved (docker, jenkins windows service and the scheduled task for the Jenkins agent).
6. Also setup directory permissions for the Jenkins user regarding Jenkins specific dirs.
End result was being able to work with docker from a non-administrator account in Windows Server 2016. From all the github threads I've read I'm unsure if docker-users group was necessary, but at least some version of docker in windows uses that for linux based containers that I've read when it's switched to that mode.