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

dokken failure on WSL1 + Docker Desktop on Windows 10 #299

Open
rliu0009 opened this issue Oct 24, 2023 · 0 comments
Open

dokken failure on WSL1 + Docker Desktop on Windows 10 #299

rliu0009 opened this issue Oct 24, 2023 · 0 comments

Comments

@rliu0009
Copy link

rliu0009 commented Oct 24, 2023

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

We are trying to setup a kitchen environment with WSL1 + Docker Desktop on Windows 10. docker command on WSL talks to Docker Desktop via environment variable DOCKER_HOST set to tcp://localhost:2375, standard docker commands run well with correct information returned.

With this setup, I could create a kitchen with no issue, however, I got "sh: /opt/kitchen/run_command: No such file or directory" error when trying kitchen converge.

There are two issues involved here.

  1. "remote_docker_host" is set to false instead of true in our setup because the logic at https://github.com/test-kitchen/kitchen-dokken/blob/main/lib/kitchen/helpers.rb#L264 is incomplete. Though I have docker_host_url set with tcp, the OperatingSystem is Docker Desktop in my case which leads to a false return
  2. Even remote_docker_host is set to false, the upload function (https://github.com/test-kitchen/kitchen-dokken/blob/main/lib/kitchen/provisioner/dokken.rb#L63) fails with a unknown reason to me, that leaves no content in /opt/kitchen on the container hence the "No such file or directory" error is returned

Version

Chef Workstation version: 23.7.1042
Cookstyle version: 7.32.2
Chef Infra Client version: 18.2.7
Chef InSpec version: 5.22.3
Chef CLI version: 5.6.12
Chef Habitat version: 1.6.652
Test Kitchen version: 3.5.0
Docker Desktop: 4.21.0

Environment

WSL1 + Docker Desktop on Windows 10, with CentOS 8 container

kitchen.yml:

---
driver:
  name: dokken
  # Connecting to Docker Desktop running on Windows from WSL
  #docker_host_url: tcp://127.0.0.1:2375
  #docker_registry: docker.artifactory2.westpac.co.nz

provisioner:
  name: dokken

transport:
  name: dokken

verifier:
  name: inspec

platforms:
  - name: centos-8
    driver:
      image: dokken/centos-8

suites:
  - name: default
    verifier:
      inspec_tests:
        - test/integration/default

Scenario

A complete kitchen run from creation to verification with dokken

Steps to Reproduce

Execute "kitchen converge"

Expected Result

converge finishes successfully

Actual Result

Getting "sh: /opt/kitchen/run_command: No such file or directory" error

➕ Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

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

No branches or pull requests

1 participant