Hey @dagrooms52, builders maintainer here;
RESIN_ARCH variable should always be the same architecture as the device that you are installing onto. The
uname binary on the other hand makes a syscall to the builder kernel, which stays the same across builds. That would explain why your install script is not working, as there is the line:
architecture = $(uname -m)
armv8l, and I guess docker does not have an entry for that exact arch string.
I see three ways of solving this in the short term, and I’m going to implement a fix which should be available in the next week or so.
- You could trick your system into getting the correct value for your device type. If you added this
RUN step before the docker install script runs it should work:
RUN cp `which uname` /bin/uname-orig && echo '#!/bin/bash\nif [[ $1 == "-m" ]]; then echo "armv7l"; else /bin/uname-orig $@; fi;' > `which uname`
- You could pull down the docker source in your build process, and build that. I’ve done this before, and IIRC the output binary can be ran on the raspberry pi, but if I’m remembering incorrectly you can control the output architecture by setting
GOOS=linux GOARCH=arm before building.
- You could run the docker install step at runtime, rather than buildtime. This method would definitely work, but it would delay the startup of your application by quite a hefty amount. This would be my “last resort” suggestion.
I’ve tested method number 1 and can confirm that docker gets installed.
Let me know if you run into any issue or you want some further clarification