简体   繁体   中英

doctl is unable to find docker binary

Configuring Digital Ocean Container Registry

link : https://www.digitalocean.com/docs/kubernetes/how-to/set-up-registry/

After Successfully : Snap install doctl

#doctl regitry login
Error : unable to Find Docker binary . make sure docker is installed 

#docker --version 
Docker version 18.09.2, build 6247962

Github Issue : https://github.com/digitalocean/doctl/issues/709

Problem

doctl is not able to find docker because snap binary path is /usr/snap/bin and docker binary path is /usr/local/bin/

so somehow connection between them is broken

THIS IS MY CUSTOM SOLUTION TO MAKE IT WORK :

Step-1 : Uninstall doctl and Refresh env path

#sudo snap remove doctl

Step-2 : Install doctl using latest package

wget https://github.com/digitalocean/doctl/releases/download/v1.17.0/doctl-1.17.0-linux-amd64.tar.gz
curl -sL https://github.com/digitalocean/doctl/releases/download/v1.38.0/doctl-1.38.0-linux-amd64.tar.gz | tar -xzv
sudo mv ~/doctl /usr/local/bin

(optional)Step ? : Fix path Problem if doctl not found then fix it using Symbolic Link

ln -s /usr/local/bin/doctl /usr/snap/doctl

Step-3 : Run docker login command

#doctl registry login

**IF getting error related to x11 then run command below and try Step-3 **

sudo apt update 
sudo apt -V install gnupg2 pass

#doctl registry login

login successfully

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM