Balena-cli : Docker seems to be unavailable. Is it installed and running?

Following https://www.balena.io/open/docs/getting-started
when I run :
balena deploy myApp --logs --source . --emulated

I get :
Docker seems to be unavailable. Is it installed and running?

I use Ubuntu and Docker is installed and docker run hello-world run just fine.

Any help is appreciated.

Hey @rlev, does your docker require sudo privileges? Could you try balena deploy with sudo?

After login on balena with credentials :
$balena devices
ID UUID DEVICE NAME DEVICE TYPE APPLICATION NAME STATUS IS ONLINE SUPERVISOR VERSION OS VERSION DASHBOARD URL
1 438d87b divine-sun raspberrypi3 myApp Idle false 8.0.0 balenaOS 2.26.0+rev1

sudo balena deploy myApp --logs --source . --emulated
Gives me :

You have to log in to continue
Run the following command to go through the login wizard:
$ balena login

Without sudo
balena deploy myApp --logs --source . --emulated
Gives me :
Docker seems to be unavailable. Is it installed and running?

Does anybody has this issue?

Never mind I fixed it. All I needed to do is manage docker as a non-root user

Thanks for sharing back what fixed the issue for your case :+1:

I can run docker without sudo on mac os but still command balena build -a myApp -h 192.168.0.110 -p 2375 . prints

Docker seems to be unavailable. Is it installed and running?

If you need help, don't hesitate in contacting us at:

  GitHub: https://github.com/balena-io/balena-cli/issues/new
  Forums: https://forums.balena.io

I know this topic was resolved some time ago, so sorry to anyone that gets notified. However, I came across this when trying to solve the same problem. We were trying to use balena deploy on CircleCI however kept getting “Docker seems unavailable”.

In the end we looked at the Balena CLI source where the docker parameters are defined. We had to specifically provide the host, port and certificate paths.

echo $DOCKER_HOST
echo $DOCKER_CERT_PATH

balena deploy $BALENA_APP_NAME --logs --debug --emulated  --dockerHost $DOCKER_HOST --ca $DOCKER_CERT_PATH/ca.pem --cert $DOCKER_CERT_PATH/cert.pem --key$DOCKER_CERT_PATH/key.pem

Thanks for the information. I’m sure it’ll help others too.