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

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:

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

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

Hey, do you have docker installed on your host?

1 Like

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)

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

1 Like

Adding the HOSTTOOLS line fixed my issue by the way :smile:

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.

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

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

1 Like

Hi ZubairLK,

I should probably point out that I’m not the original poster :wink: . 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.

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

1 Like