circleci-cli: Unable to run `circleci local execute` from windows machine
Running docker on windows:
> docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:21:34 2018
OS/Arch: windows/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:29:02 2018
OS/Arch: linux/amd64
Experimental: true
Attempting to build locally results in:
There ins’t any extra information when running it with the --verbose flag.
Docker image digest: sha256:3d88cfffd448da07ff8ced22ccdca5adc09ff18e87dc7db9b8af5b8a47647c08
Error: failed to execute docker: not supported by windows
Which would make sense given that "--volume", "/var/run/docker.sock:/var/run/docker.sock" wouldn’t work on windows.
After some googlefoo -
-v //var/run/docker.sock:/var/run/docker.sock seems to work from windows
But I still have issues getting the docker to build by manually running it for now with:
docker run --interactive --tty --rm ^
-v //var/run/docker.sock:/var/run/docker.sock ^
-v %cd%:/root/.circleci ^
--workdir /%cd%\ ^
circleci/picard circleci build -c /root/.circleci/config.yml
Error: error starting container <>: Error response from daemon: invalid mode: /tmp/_circleci_local_build_repo
Error:
Unexpected environment preparation error: Error response from daemon: invalid mode: /tmp/_circleci_local_build_repo
Step failed
Task failed
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 16
- Comments: 18 (5 by maintainers)
@marcomorain how do you measure demand? In addition to the factor noted by @TimMensch I would note that many Windows developers are probably just giving up as soon as it doesn’t work (as I almost did), but would use it if it did work. How do you know how many of those there are?
Any chance of CircleCI offering a bounty for the PR?
This is a key feature you’re missing – still nearly half of developers use Windows, and just because you’re not using it internally doesn’t mean you’re not losing customers (like myself) who do a lot of CircleCI development but who feel ignored when an issue as critical as this sits ignored for two years.
The whole “lack of demand” can be explained by the fact that none of your instructions even tell people where to find the
circleciimage; instead you need to go on a bit of a scavenger hunt to even find it.And it’s a bit harder to motivate to do development that primarily benefits a commercial company.
It’s been 4 years now…
Please guys, dear maintainers of CircleCI, we really want to be able to run a container locally, otherwise the CLI is useless to us. Most of us (if not all of us) will not leave the comfort of Windows (yes, I said comfort), and if we were forced to choose between moving to another os, or… NOT using the circleci CLI, we would (sadly) choose the latter.
Hi @ashthespy - thanks for creating the issue.
We don’t support running builds on Windows at present. I think we should make that error message far more clear, too - “not supported by windows”.
That said, there are no fundamental reasons why we don’t support Windows right now. It’s because of lack of demand, coupled with no-one on the team here using Windows as a dev machine.
I’d be happy to review a PR to get this working.
Marc
And still we wait … We have a complex tech stack with older code in .Net Framework (requiring msbuild to compile) and newer stuff in .Net 7, Node, TypeScript, etc. It is problematic for us to only be able to build a portion of our code-base, and not practical to rewrite millions of lines of legacy code.
That is correct, workflows are not supported locally.
@marcomorain if you could point me towards the right requirements to get the docker container up and building, I’d be happy to submit a PR with the debugged and working config.
In the current form, the docker run command doesn’t work with my windows setup. Especially the
-v pwd:pwdmapping. The docker host doesn’t know of my current pwd.I also tired it with:
Which hangs at:
It looks like the container is trying to access my C: and thus doesn’t succeed?
Setting the current
--workdirI get the invalid mode error as above.