# Issues with deploying to the device

**URL:** <https://forums.balena.io/t/issues-with-deploying-to-the-device/5589>\
**Category:** openBalena\
**Tags:** raspberrypi3, balena-cli\
**Created:** [March 11, 2019, 9:08am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589 "2019-03-11T09:08:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fruloops](https://avatars.discourse-cdn.com/v4/letter/f/e47774/32.png) [@fruloops](https://forums.balena.io/u/fruloops)\
**Post date:** [March 11, 2019, 9:08am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589/1 "2019-03-11T09:08:13Z")

</div>

Following the ‘get started’ guide I’ve set up the openBalena instance, configured DNS, balena CLI and certs. My local machine is running Windows 10, openBalena instance is running on an Ubuntu Linux server.

I’ve also created the app and setup the device. The device is running online.

> $ balena device b9257cb  
> == SPRING DARKNESS  
> ID: 2  
> DEVICE TYPE: raspberrypi3  
> STATUS: idle  
> IS ONLINE: true  
> IP ADDRESS: —.—.—.—  
> APPLICATION NAME: testApp2  
> UUID: b9257cb…2  
> SUPERVISOR VERSION: 9.0.1  
> OS VERSION: balenaOS 2.29.2+rev2

I have an issue however with deploying the example project to the device. Running `balena deploy testApp2 --logs --source . --emulated -- build` results in the following message:

> $ balena deploy testApp2 --logs --source . --emulated --build  
> Docker seems to be unavailable. Is it installed and running?

Docker is installed and running on my local machine, though perhaps I should configure it correctly.

Also, looking at the CLI docs, should I specify the IP of my device when I’m deploying or something along those lines using the --dockerHost and --dockerPort switches to point to my RPI3 device? I might have this confused but the project is built on my local machine, and then ‘deployed’ to my device, correct? Assuming this, there would most likely be an issue with my local configuration and not with the device.

---

<div class="post-metadata">

**Author:** ![dfunckt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dfunckt/32/56_2.png) [@dfunckt](https://forums.balena.io/u/dfunckt)\
**Post date:** [March 11, 2019, 9:37am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589/4 "2019-03-11T09:37:07Z")

</div>

Hello, it seems Docker on your local machine is unreachable, or configured in a non-standard way. What happens if you run `$ docker ps`?

---

<div class="post-metadata">

**Author:** ![fruloops](https://avatars.discourse-cdn.com/v4/letter/f/e47774/32.png) [@fruloops](https://forums.balena.io/u/fruloops)\
**Post date:** [March 11, 2019, 9:49am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589/6 "2019-03-11T09:49:08Z")

</div>

Running docker ps gives me:

> $ docker ps  
> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

The config on docker should be the default one, as I’ve not fiddled with it yet. After installing docker I ran the suggested `docker run hello-world` to test the installation, and it seemed to have worked correctly, so I left it as it was.

---

<div class="post-metadata">

**Author:** ![dfunckt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dfunckt/32/56_2.png) [@dfunckt](https://forums.balena.io/u/dfunckt)\
**Post date:** [March 11, 2019, 10:01am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589/8 "2019-03-11T10:01:03Z")

</div>

Can you try running the command with `--docker=//./pipe/docker_engine`?

---

<div class="post-metadata">

**Author:** ![fruloops](https://avatars.discourse-cdn.com/v4/letter/f/e47774/32.png) [@fruloops](https://forums.balena.io/u/fruloops)\
**Post date:** [March 11, 2019, 10:09am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589/9 "2019-03-11T10:09:59Z")

</div>

Sure, no problem.

> $ balena deploy testApp2 --logs --source . --emulated --build --docker=//./pipe/docker\_engine  
> [Info] Creating default composition with source: C:\Users\fruloops\Downloads\OpenBalena\Git\sense-snake  
> [Info] Building for armv7hf/raspberrypi3  
> [Build] Building services…  
> [Build] main Preparing…  
> [Build] Built 1 service in 0:15  
> [Error] Deploy failed  
> Get [https://registry-1.docker.io/v2/:](https://registry-1.docker.io/v2/:) net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

So it would seem that at least the build started now

EDIT: looking at the [https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/) I get the following:  
`{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}`, so perhaps this is an authentication issue with docker or the network restriction of the network I’m on.

---

<div class="post-metadata">

**Author:** ![fruloops](https://avatars.discourse-cdn.com/v4/letter/f/e47774/32.png) [@fruloops](https://forums.balena.io/u/fruloops)\
**Post date:** [March 12, 2019, 6:23am UTC](https://forums.balena.io/t/issues-with-deploying-to-the-device/5589/11 "2019-03-12T06:23:49Z")

</div>

Update: The latest issue seemed to be with the docker registry and the network I’m on. I’ve set up a private registry and used that in the Dockerfile and deployed to my device and it worked like a charm.

@dfunckt Thanks for your help.
