zewelor / bt-mqtt-gateway

A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
548 stars 116 forks source link

Add ARMv6 docker build #224

Closed andrey-yantsen closed 3 years ago

andrey-yantsen commented 3 years ago

Description

After this change github-actions would start building ARMv6 images in addition to existing ones.

I'm building my own cluster of RPi0, to use in home automation and the easiest way to deploy everything is to use Docker. Yeah, I know that it's crazy — to use Docker on rpi0, but anyway.

Type of change

Please delete options that are not relevant.

zewelor commented 3 years ago

Great thanks, please write how it works !

andrey-yantsen commented 3 years ago

It worked like a charm, thanks! It's very sad though, that it's impossible to use the Bluetooth chip from Docker without --net=host.

zewelor commented 3 years ago

Maybe its possible to skip netowrk host and use some caps, maybe --cap-add NET_ADMIN ?

andrey-yantsen commented 3 years ago

Didn't worked for me :( Everything was fine only with net=host.

h4de5 commented 3 years ago

just a small notice for anybody actually trying this on a rpi0.

during pull, I needed to add the platform like this:

docker pull --platform=linux/arm/v6 zewelor/bt-mqtt-gateway

to allow that parameter you need to create / edit this file:

/etc/docker/daemon.json

{
  "experimental": true
}

otherwise it keep downloading the armv7 image and crash during start.

andrey-yantsen commented 3 years ago

@h4de5 it was fixed in https://github.com/containerd/containerd/pull/4530, and works for me just fine, when docker installed not from the debian repo.

h4de5 commented 3 years ago

I was on raspbian 8 (4.19) - using docker 18.06.3-ce. havn't updated that in a while.