devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.37k stars 361 forks source link

Custom image build command: exec: "com.docker.cli": executable file not found in %PATH% #2440

Closed Quasarman closed 1 year ago

Quasarman commented 1 year ago

What happened?

When I try to use the custom build command for an image I get an error stating exec: "com.docker.cli": executable file not found in %PATH% despite my path that is printed below this error message clearly containing C:\Program Files\Docker\Docker\resources\bin\com.docker.cli.exe. I also manually checked the environment variables on my system and it is definitely there.

When I run the custom command (see below) in the terminal everything is working as expected and the image builds normally. Also all other docker commands are working just fine. I have verified that docker desktop is running and also reinstalled it twice + the various rebooting of my machine.

What did you expect to happen instead?

The build custom command to succeed.

How can we reproduce the bug? (as minimally and precisely as possible)

  1. For me its just happening when wanting to build a image with an devspace.yaml like below shows
  2. Run devspace dev
  3. Custom build command will fail with exec: "com.docker.cli": executable file not found in %PATH%

My devspace.yaml:

version: v1beta11
...
images:
  bento-statistics:
    image: my/bento-statistics
    build:
      custom:
        skipImageArg: true
        command: |-
          bentoml build models/bentos/statistics --version ${runtime.images.bento-statistics.tag} --do-not-track
          docker build -t ${runtime.images.bento-statistics.image}:${runtime.images.bento-statistics.tag} . -f ${devspace.userHome}/bentoml/bentos/statistics-service/${runtime.images.bento-statistics.tag}/env/docker/Dockerfile
        onChange:
          - models/bentos/statistics/bentofile.yaml
          - models/bentos/statistics/*.py
...

Local Environment:

Anything else we need to know?

I am running docker desktop 4.11.1 I also verified that the com.docker.cli.exe exists:

$ where com.docker.cli
C:\Program Files\Docker\Docker\resources\bin\com.docker.cli.exe
Quasarman commented 1 year ago

I also wanted to add that the first command bentoml build models/bentos/statistics --version ${runtime.images.bento-statistics.tag} --do-not-track works as expected. bentoml is just an executable that is located in my Python installation (and the path of the Python installation is part of my %PATH% variable).

Quasarman commented 1 year ago

Update: We upgraded to v6.2.1 and the issues are gone now.