ZupIT / ritchie-cli

Ritchie CLI is an open-source tool that allows to create, store and share any kind of automation, executing them through command lines, to run operations or start workflows ⚙️ 🖥 💡
https://docs.ritchiecli.io
Apache License 2.0
560 stars 104 forks source link

exec: "com.docker.cli": executable file not found in $PATH #914

Closed otavioarc closed 3 years ago

otavioarc commented 3 years ago

What happened: I'm trying to run the hello-world demo formula using docker but I'm getting the error exec: "com.docker.cli": executable file not found in $PATH when I run rit demo hello-world --docker in terminal.

Screen Shot 2021-04-26 at 00 40 37

What you expected to happen: Print the message:

Hello World!
My name is Otavio.
I'm excited in creating new formulas using Ritchie.
Today, I want to automate everything.
My secret is I like potato.

How to reproduce it (as minimally and precisely as possible): Execute a fresh install of docker and Ritchie CLI, initialize Ritchie and execute rit demo hello-world --docker in terminal.

Anything else we need to know?:

Environment:

GuillaumeFalourd commented 3 years ago

Hi @otavioarc , thank you for reporting this issue 👍🏼

This error isn't related to Ritchie, but to Docker for macOS users. I suggest you take a look at this post on StackOverflow, and update your Docker configurations.

Could you try it and tell us if it worked for you?

If the problem persists, it may be related to another iSSUE which has been opened recently here.

otavioarc commented 3 years ago

Hi @GuillaumeFalourd . Thanks for the answer.

I tried the possible solutions reported in the StackOverflow question, but I've had no success.

Probably a downgrade to a version which still have the Disable Cloud Experience option and later updating the docker to the most recent version would work, but as I'm using Apple Silicon M1 CPU I can't run versions prior to 3.3.1.

I also tried to fix it through docker config files but it didn't work.

I'll keep my eyes on the issue you mentioned, and update my issue as soon as I found a solution.

Thanks for the support.

dcominottim commented 3 years ago

The issue is also present in Windows 10 20H2 and Docker 3.3.3, both with or without the WSL2 backend :

PS C:\Users\dcomi> rit dcominottim hello-java
Docker image build started
failed to get console mode for stdin: The handle is invalid.
[+] Building 13.9s (13/13) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                        0.0s
 => => transferring dockerfile: 281B                                                                                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                             0.0s
 => [internal] load metadata for docker.io/ritclizup/rit-java11-runner:latest                                                                                                                               2.2s
 => [auth] ritclizup/rit-java11-runner:pull token for registry-1.docker.io                                                                                                                                  0.0s
 => [1/7] FROM docker.io/ritclizup/rit-java11-runner@sha256:a14d26420018ec7f925b67000ee7bb2fa2c927dcc56bdad8c9ffa4bd6c0187ce                                                                               10.9s
 => => resolve docker.io/ritclizup/rit-java11-runner@sha256:a14d26420018ec7f925b67000ee7bb2fa2c927dcc56bdad8c9ffa4bd6c0187ce                                                                                0.0s
 => => sha256:a14d26420018ec7f925b67000ee7bb2fa2c927dcc56bdad8c9ffa4bd6c0187ce 1.38kB / 1.38kB                                                                                                              0.0s
 => => sha256:5138a86871eb94ed4584269b5232d0758ab2a2536e7f3bfdd4108e2825a24efc 2.19kB / 2.19kB                                                                                                              0.0s
 => => sha256:f84cab65f19f5d625a4b5f895cdf37ad9f21e160bf201ec59a48d95b2a430145 2.80MB / 2.80MB                                                                                                              0.5s
 => => sha256:f52eecaed8788b6e80326f2d0b858932556c859453cc7667badcefc2f32df6d2 2.18MB / 2.18MB                                                                                                              0.7s
 => => extracting sha256:f84cab65f19f5d625a4b5f895cdf37ad9f21e160bf201ec59a48d95b2a430145                                                                                                                   0.1s
 => => sha256:fe6f765aa14e3b3667f1a567437799dd618e4396909dd733208f334c68d32dd1 12.95MB / 12.95MB                                                                                                            1.4s
 => => sha256:2126d7e3732f23723f8111227d332a6f44ac56b8fc6b279417c293c05221d6d0 76.83MB / 76.83MB                                                                                                            6.8s
 => => extracting sha256:f52eecaed8788b6e80326f2d0b858932556c859453cc7667badcefc2f32df6d2                                                                                                                   0.2s
 => => sha256:9a9908264c66f0d00cab59e1320a80ed26cac0ce1d5d30eafcc291e122996ce9 138.78MB / 138.78MB                                                                                                          8.5s
 => => extracting sha256:fe6f765aa14e3b3667f1a567437799dd618e4396909dd733208f334c68d32dd1                                                                                                                   0.3s
 => => extracting sha256:2126d7e3732f23723f8111227d332a6f44ac56b8fc6b279417c293c05221d6d0                                                                                                                   1.6s
 => => extracting sha256:9a9908264c66f0d00cab59e1320a80ed26cac0ce1d5d30eafcc291e122996ce9                                                                                                                   2.3s
 => [internal] load build context                                                                                                                                                                           0.0s
 => => transferring context: 87.81kB                                                                                                                                                                        0.0s
 => [2/7] RUN mkdir /rit                                                                                                                                                                                    0.1s
 => [3/7] COPY . /rit                                                                                                                                                                                       0.0s
 => [4/7] RUN sed -i 's/\r//g' /rit/set_umask.sh                                                                                                                                                            0.1s
 => [5/7] RUN sed -i 's/\r//g' /rit/run.sh                                                                                                                                                                  0.2s
 => [6/7] RUN chmod +x /rit/set_umask.sh                                                                                                                                                                    0.2s
 => [7/7] WORKDIR /app                                                                                                                                                                                      0.0s
 => exporting to image                                                                                                                                                                                      0.1s
 => => exporting layers                                                                                                                                                                                     0.0s
 => => writing image sha256:15243461cb59be70fd72ccc1e8fce67d5bfe75b781a55a003a9bbf0b18c15ba2                                                                                                                0.0s
 => => naming to docker.io/library/rit-repo-local-default-formula-dcominottim-hello-java                                                                                                                    0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Docker image successfully built!
? Type your name:  danilo
? Have you ever used Ritchie?  false
? What do you want to automate?  daily tasks
? Tell us a secret:  *
exec: "com.docker.cli": executable file not found in %PATH%
rename C:\Users\dcomi\.rit\tmp\6958b5b4-a841-4e6b-af3b-e56ae0feffe0\.docker C:\Users\dcomi\.docker: Access is denied.
Error: exit status 1
PS C:\Users\dcomi>