dapr / cli

Command-line tools for Dapr.
Apache License 2.0
317 stars 202 forks source link

There is already a docker binary file in the /usr/local/bin directory #1299

Closed spatxos closed 1 year ago

spatxos commented 1 year ago

Ask your question here

in the /usr/local/bin directory:

root/usr/local/bin$ ll

lrwxrwxrwx  1 root root       15  5月 29 12:14 com.docker.cli -> /usr/bin/docker*
-rwxr-xr-x  1 root root 77750477  5月 23 11:11 dapr*
drwxr-xr-x  2 root root     4096  6月  3 09:04 daprd_linux_amd64/
-r--r--r--  1 root root      207  5月 23 11:11 details.json
drwxr-xr-x  2 root root     4096  5月 23 11:11 dist/
-rwxr-xr-x  1 root root 57843712  4月 27 04:35 docker*
-rwxr-xr-x  1 root root 54537935  5月 20 23:03 docker-compose*

I can't put daprbundle/docker into the /usr/local/bin directory when I use --from-dir to initialize dapr.

root:/usr/local/bin$ dapr init --from-dir .

⌛  Making the jump to hyperspace...
⚠  Local bundle installation using --from-dir flag is currently a preview feature and is subject to change. It is only available from CLI version 1.7 onwards.
❌  could not connect to Docker. Docker may not be installed or running

how do i go about solving this problem?

spatxos commented 1 year ago
  1. Modify the permissions and content of the detail.json file
    sudo chmod 644 detail.json
    sudo nano detail.json //"dockerImageSubDir": "daprdocker"
  2. Create a daprdocker folder, and download and copy the daprio-dapr-1.10.7.tar.gz file from daprbundle to the daprdocker folder
    mkdir daprdocker
    # https://github.com/dapr/installer-bundle/releases 
    cp /home/user/download/daprbundle_linux_amd64/daprbundle/docker/daprio-dapr-1.10.7.tar.gz /usr/local/bin/daprdocker/
    # sudo chmod 644  /usr/local/bin/daprdocker/daprio-dapr-1.10.7.tar.gz  //Modify permissions if needed
  3. Uninstall the previous dapr installation and install using the file under the current file
    dapr uninstall && dapr init --from-dir .