# Mkfs-hostapp-native problem building (docker not found)

**URL:** <https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691>\
**Category:** Product support\
**Created:** [March 12, 2018, 10:49pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691 "2018-03-12T22:49:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![open-nandra](https://avatars.discourse-cdn.com/v4/letter/o/c4cdca/32.png) [@open-nandra](https://forums.balena.io/u/open-nandra)\
**Post date:** [March 12, 2018, 10:49pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/1 "2018-03-12T22:49:24Z")

</div>

Hi, I’m trying to bump resin from 2.7.6 to 2.12.1. Previously I was using jethro but because of some rust issues (which was pulled with later resin) I bumped poky to rocko. Building went fine until I hit following:

```auto
Log data follows:
| DEBUG: Executing shell function do_compile
| build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.26689: line 111: docker: command not found
| build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.26689: line 112: docker: command not found
| WARNING: build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.26689:1 exit 127 from 'docker save "$IMAGE_ID" > build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/work/mkfs-hostapp-ext4-image.tar'

```

when changed in recipe path to docker to /usr/bin/docker it works fine. I’m using stock ubuntu 16.04 with docker installed:  
Client:  
Version: 17.05.0-ce  
API version: 1.29  
Go version: go1.7.5  
Git commit: 89658be  
Built: Thu May 4 22:10:54 2017  
OS/Arch: linux/amd64

Server:  
Version: 17.05.0-ce  
API version: 1.29 (minimum version 1.12)  
Go version: go1.7.5  
Git commit: 89658be  
Built: Thu May 4 22:10:54 2017  
OS/Arch: linux/amd64  
Experimental: false

Any hints? Thanks.

Marek

---

<div class="post-metadata">

**Author:** ![liamdiprose](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@liamdiprose](https://forums.balena.io/u/liamdiprose)\
**Post date:** [October 29, 2019, 10:50pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/4 "2019-10-29T22:50:09Z")

</div>

I was also having this issue while adding my own board. I needed to add the following to `conf/samples/local.conf.sample`:

```
HOSTTOOLS += "docker"

```

Otherwise docker doesn’t compile, so doesn’t end up in any of the PATH directories.

[Raspberry Pi’s local.conf.sample](https://github.com/balena-os/balena-raspberrypi/blob/bc36231d59502c7dd0dcdc8a2a1c343e720b33f5/layers/meta-balena-raspberrypi/conf/samples/local.conf.sample#L89)

---

<div class="post-metadata">

**Author:** ![\_Page](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/_page/32/22_2.png) [@\_Page](https://forums.balena.io/u/_Page)\
**Post date:** [October 29, 2019, 11:12pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/5 "2019-10-29T23:12:57Z")

</div>

Hey, do you have docker installed on your host?

---

<div class="post-metadata">

**Author:** ![liamdiprose](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@liamdiprose](https://forums.balena.io/u/liamdiprose)\
**Post date:** [October 29, 2019, 11:45pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/7 "2019-10-29T23:45:40Z")

</div>

Yep, it’s executable is in /usr/bin.

The script that failed had set it’s own PATH variable, which didn’t include /usr/bin.

(But it did include hosttools, which prompted me to look at the local.conf.sample file again)

---

<div class="post-metadata">

**Author:** ![\_Page](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/_page/32/22_2.png) [@\_Page](https://forums.balena.io/u/_Page)\
**Post date:** [October 29, 2019, 11:55pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/8 "2019-10-29T23:55:26Z")

</div>

Ok, I’ve pinged the devices team who’ll be better able to help with this and will probably have a look tomorrow

---

<div class="post-metadata">

**Author:** ![liamdiprose](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@liamdiprose](https://forums.balena.io/u/liamdiprose)\
**Post date:** [October 29, 2019, 11:57pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/10 "2019-10-29T23:57:42Z")

</div>

Adding the HOSTTOOLS line fixed my issue by the way 😄

I guess it would be nice to use the host’s docker instead of compiling it.

Edit: Apparently the host’s docker is actually used. Just spied a process running during a build.

---

<div class="post-metadata">

**Author:** ![zubairlk](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/zubairlk/32/954_2.png) [@zubairlk](https://forums.balena.io/u/zubairlk)\
**Post date:** [October 30, 2019, 9:29am UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/12 "2019-10-30T09:29:26Z")

</div>

Hi,

When you moved the version from 2.7.6 to 2.12.1, did you perform a clean build after removing the `build` folder? Or did you just move the layers?

The reason I’m asking is that this is a rather large jump. And if the `build` folder already exists, it won’t be regenerated. Any changes in `local.conf.sample` won’t appear in `build/conf/local.conf`  
e.g. This change happened somewhere around 2.7.4 [https://github.com/balena-os/balena-raspberrypi/commit/a822060d5e5e2547fbd8a3bc3f8ef96503ef777a](https://github.com/balena-os/balena-raspberrypi/commit/a822060d5e5e2547fbd8a3bc3f8ef96503ef777a)

So the fact that you didn’t have `HOSTTOOLS += "docker iptables"` in your conf is suspicious.  
I suspect that is what is happening here.

Also, you are correct, the host docker is used during the build.

I would recommend starting a clean folder. (does take a long time)

Also, perhaps try going to a more latest OS version.

Regards  
ZubairLK

---

<div class="post-metadata">

**Author:** ![liamdiprose](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@liamdiprose](https://forums.balena.io/u/liamdiprose)\
**Post date:** [October 30, 2019, 9:45pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/14 "2019-10-30T21:45:16Z")

</div>

Hi ZubairLK,

I should probably point out that I’m not the original poster 😉 . I wasn’t making a version bump, I just had the same ‘docker not found’ problem as the OP. I posted my fix so other people could get unstuck.

Your documentation for adding a new board has us write our own local.conf.sample, using the Raspberry Pi as an example. I just missed the HOSTTOOLS line (linked above).

And yes, I did find that the `build/conf` directory doesn’t change. Deleting it and rerunning `barys` seems to regenerate it.

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [October 30, 2019, 10:01pm UTC](https://forums.balena.io/t/mkfs-hostapp-native-problem-building-docker-not-found/2691/15 "2019-10-30T22:01:43Z")

</div>

Thanks for clarifying @liamdiprose and double-thanks for helping out a fellow user 👍 I think we should see what they come back with and go from there, your suggestion seems to make sense to me at least.
