CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
405 stars 233 forks source link

Unable to run circleci local execute from windows machine 2021 #647

Open emmanuelware opened 2 years ago

emmanuelware commented 2 years ago

I'm trying to run a simple local job that just prints the "Hello, World".

I've followed all the setup steps and have docker installed. Both windows and linux containers, but I get the following error:

Docker image digest: sha256:9a2d1372cf24245b44c9b8738e9a89085c9dd60cce429251edc07756f06c668b Error: failed to execute docker: not supported by windows

Client: Cloud integration: v1.0.20 Version: 20.10.10 API version: 1.41 Go version: go1.16.9 Git commit: b485636 Built: Mon Oct 25 07:47:53 2021 OS/Arch: windows/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.10 API version: 1.41 (minimum version 1.12) Go version: go1.16.9 Git commit: e2f740d Built: Mon Oct 25 07:41:30 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.11 GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8 runc: Version: 1.0.2 GitCommit: v1.0.2-0-g52b36a2 docker-init: Version: 0.19.0 GitCommit: de40ad0

Attached is the full error: `circleci --debug local execute --job say-hello

variables: map[config:# Use the latest 2.1 version of CircleCI pipeline process engine. version: 2.1

jobs: say-hello:

Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.

# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
docker:
  - image: cimg/base:stable
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
  - checkout
  - run:
      name: "Say hello"
      command: "echo Hello, World!"

workflows: say-hello-workflow: jobs:

4TT1L4 commented 1 year ago

There might be a clue in the docker command:

docker run --interactive \
                  --tty \
                  --rm
                  --volume /var/run/docker.sock:/var/run/docker.sock \
                  --volume /tmp\2507096102_circleci_config.yml:/tmp/local_build_config.yml \
                  --volume C:\Users\eware_000\Desktop\Work Desk\Work Projects\SQLApps\fieldca-freedom:C:\Users\eware_000\Desktop\Work Desk\Work Projects\SQLApps\fieldca-freedom \
                  --volume C:\Users\eware_000/.circleci:/root/.circleci \
                  --workdir C:\Users\eware_000\Desktop\Work Desk\Work Projects\SQLApps\fieldca-freedom \
                  circleci/picard@sha256:9a2d1372cf24245b44c9b8738e9a89085c9dd60cce429251edc07756f06c668b 

The docker.sock refers to a Unix socket. This is not available on windows.

This might explain the error message as well:

Error: failed to execute docker: not supported by windows