Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create fails on Windows #137

Open
tpetchel opened this issue Jan 4, 2018 · 7 comments
Open

Create fails on Windows #137

tpetchel opened this issue Jan 4, 2018 · 7 comments
Labels

Comments

@tpetchel
Copy link

tpetchel commented Jan 4, 2018

Environment

  • Windows 10, Docker for Windows
  • Chef DK 2.4.17
  • kitchen-dokken 2.6.5
  • Docker version 17.09.1-ce, build 19e2cf6

Repro steps

  1. Enable "Expose daemon on tcp://localhost:2375 without TLS" from Docker settings.
  2. Run these commands:
$ $env:DOCKER_HOST = "tcp://127.0.0.1:2375"
$ git clone https://github.com/learn-chef/my_apache.git
$ cd my_apache
$ kitchen create

Output

PS C:\Users\tpetc\learn-chef\cookbooks\auditd> kitchen create
-----> Starting Kitchen (v1.19.2)
-----> Creating <default-ubuntu-1604>...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [</c/Users/tpetc/.dokken-network.lock> is not locked!] on default-ubuntu-1604
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

If my .kitchen.yml is missing something, please let me know! This prevents some Learn Chef modules from working on Windows, so we'd love a fix. Thanks!

@hmusavi
Copy link

hmusavi commented May 22, 2018

I am also getting this same error trying to use dokken driver on Windows 10. Has anyone come up with a resolution? Thanks!

@josh-barker
Copy link

I've found the same problem.

I commented out this line of code and then it began to work.
https://github.com/someara/kitchen-dokken/blob/master/lib/kitchen/helpers.rb#L152

However, I'm not sure on the impact to the rest of how dokken works.

@deeco
Copy link

deeco commented Jul 25, 2018

Same issue with commented out line ,

@Blankf
Copy link

Blankf commented Aug 29, 2018

Anyone already able to resolve this, the line already commented in my version but same issue.

Windows 10, Docker for Windows
chefdk 3.1.0
kitchen-dokken 2.6.7
Docker Version 18.06.1-ce-win74 (19508)
Kitchen version 1.22.0

@phi482
Copy link

phi482 commented Jul 8, 2019

I am getting the same error with my Windows 10 instance. My HOME directory was set to my user folder (which is redirected to a file share) so I changed my $env:HOME = "C:\temp" and 'kitchen create' was then successful. I never saw the .dokken folder get created on my user share, but did immediately when I changed the environment variable.

This is just a temporary workaround and maybe this will provide some useful data for the maintainers.

@kiliantyler
Copy link

#183
This was the resolution for me on Windows 10.

$env:DOCKER_HOST='tcp://127.0.0.1:2375'

@Bob-at-RH
Copy link

I had to use both

$env:DOCKER_HOST='tcp://127.0.0.1:2375'
$env:HOME = "C:\temp"

plus I had to move my repo to from One-Drive (spaces and other issues)
Now, I've found that the files are getting built with CRLF vs LF for Linux when building on Windows 10.
/opt/kitchen/run_command is getting built with CRLF line ending and who know what other files are impacted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants