I’m trying to run balenaOS in a docker container on a RPI4 (Raspberry Pi OS (32-bit)) and then run a balena-sound. Due to the fact that my rpi4 has a 32-bit operating system, I run containers on the “resin/resinos:2.75.0_rev1-raspberrypi3” image, because “resin/resinos:2.75.0_rev1.dev-raspberrypi4-64” is not runs on my 32 bit operating system.
./balenaos-in-container.sh --image resin/resinos:2.75.0_rev1-raspberrypi3 --id balena-os -c "./sound.config.json"
INFO: Creating balena-boot-balena-os docker volume...
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
INFO: Creating balena-state-balena-os docker volume...
INFO: Creating balena-data-balena-os docker volume...
INFO: Running balenaOS as container balena-container-balena-os ...
WARNING: Localhost DNS setting (--dns=127.0.0.2) may fail in containers.
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
No drop-in found. Most probably you don't run a development image.
Welcome to balenaOS 2.75.0+rev1!
/lib/systemd/system/balena-host.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/balena-host.sock → /run/balena-host.sock; please update the unit file accordingly.
/lib/systemd/system/balena-engine.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/balena-engine.sock → /run/balena-engine.sock; please update the unit file accordingly.
[ OK ] Created slice User and Session Slice.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Remote File Systems.
[ OK ] Reached target Slices.
[ OK ] Reached target Swap.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Listening on udev Kernel Socket.
Mounting Kernel Debug File System...
Mounting Temporary Directory (/tmp)...
Starting Create list of stati…ce nodes for the current kernel...
Starting OS configuration device key service...
Starting Rollback clear bootc… altboot crumb is still present...
Mounting FUSE Control File System...
Mounting Kernel Configuration File System...
Starting Remount Root and Kernel File Systems...
Starting Apply Kernel Variables...
Starting udev Coldplug all Devices...
Starting Setup Virtual Console...
Starting Set the system clock from the build timestamp...
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted Temporary Directory (/tmp).
[ OK ] Started Create list of static…vice nodes for the current kernel.
[ OK ] Started OS configuration device key service.
[ OK ] Started Rollback clear bootco…if altboot crumb is still present.
[ OK ] Mounted FUSE Control File System.
[ OK ] Mounted Kernel Configuration File System.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Setup Virtual Console.
[ OK ] Started Set the system clock from the build timestamp.
[ OK ] Started Remount Root and Kernel File Systems.
Starting Create Static Device Nodes in /dev...
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Set up automount mnt-sysroot-inactive partition.
Mounting resin-data bind mount...
Mounting /var/volatile...
[ OK ] Mounted resin-data bind mount.
[ OK ] Mounted /var/volatile.
Starting Resin reset OS state...
Starting Bind mount volatile /var/cache...
Starting Bind mount volatile /var/lib...
Starting Bind mount volatile /var/spool...
Starting Bind mount volatile /srv...
[ OK ] Started Bind mount volatile /var/cache.
[ OK ] Started Bind mount volatile /var/lib.
[ OK ] Started Bind mount volatile /var/spool.
[ OK ] Started Bind mount volatile /srv.
[ OK ] Started Resin reset OS state.
Mounting Bind mount for /etc/fake-hwclock...
Mounting Docker data mountpoint...
[ OK ] Mounted Bind mount for /etc/fake-hwclock.
[ OK ] Mounted Docker data mountpoint.
[ OK ] Reached target Local File Systems.
Starting Restore/save the current clock...
[ OK ] Started Restore/save the current clock.
Starting Journal Service...
[ OK ] Started udev Coldplug all Devices.
Starting udev Wait for Complete Device Initialization...
[ OK ] Started Journal Service.
Starting Create Volatile Files and Directories...
[ OK ] Started Create Volatile Files and Directories.
Starting Bind mount for /etc/NetworkManager/conf.d...
Starting Bind mount for /etc/…tworkManager/system-connections...
Starting Bind mount for /etc/docker...
Starting Bind mount for /etc/hostname...
Starting Bind mount for /etc/openvpn...
Starting Bind mount for /etc/resin-supervisor...
Starting Bind mount for /etc/ssh/hostkeys...
Starting Bind mount for /etc/udev/rules.d...
Starting Bind mount for /home/root/.docker...
Starting Bind mount for /home/root/.rnd...
Starting Bind mount for /home/root/.ssh...
Starting Bind mount for /usr/share/ca-certificates/balena...
Starting Bind mount for /var/lib/NetworkManager...
Starting Bind mount for /var/lib/bluetooth...
Starting Bind mount for /var/lib/chrony...
Starting Bind mount for /var/lib/systemd...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Bind mount for /etc/NetworkManager/conf.d.
[ OK ] Started Bind mount for /etc/NetworkManager/system-connections.
[ OK ] Started Bind mount for /etc/docker.
[ OK ] Started Bind mount for /etc/hostname.
[ OK ] Started Bind mount for /etc/resin-supervisor.
[ OK ] Started Bind mount for /etc/openvpn.
[ OK ] Started Bind mount for /etc/ssh/hostkeys.
[ OK ] Started Bind mount for /etc/udev/rules.d.
[ OK ] Started Bind mount for /home/root/.docker.
[ OK ] Started Bind mount for /home/root/.rnd.
[ OK ] Started Bind mount for /home/root/.ssh.
[ OK ] Started Bind mount for /usr/share/ca-certificates/balena.
[ OK ] Started Bind mount for /var/lib/NetworkManager.
[ OK ] Started Bind mount for /var/lib/bluetooth.
[ OK ] Started Bind mount for /var/lib/chrony.
[ OK ] Started Bind mount for /var/lib/systemd.
Starting udev Kernel Device Manager...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started udev Wait for Complete Device Initialization.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Hardware RNG Entropy Gatherer Daemon.
[ OK ] Reached target System Initialization.
[ OK ] Started Config.json path watch.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Balena supervisor updater timer.
[ OK ] Reached target Paths.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Starting Docker Socket for the API.
Starting Docker Socket for the API.
[ OK ] Listening on D-Bus System Message Bus Socket.
Starting sshd.socket.
[ OK ] Reached target System Time Set.
[ OK ] Listening on Docker Socket for the API.
[ OK ] Listening on Docker Socket for the API.
[ OK ] Listening on sshd.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Modem Manager...
Starting Balena device UUID...
[ OK ] Started NTP client/server.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Periodically update the saved fake-hwclock..
[ OK ] Started Periodic check for configuration changes.
[ OK ] Started Periodic vacuum of journald logs.
[ OK ] Reached target Timers.
[ OK ] Started D-Bus System Message Bus.
Starting Extract custom CA from config.json...
Starting IPv6 Packet Filtering Framework...
Starting IPv4 Packet Filtering Framework...
Starting NetworkManager confi…tion fragments from config.json...
Starting OS SSH keys...
Starting udev rules configuration from config.json...
Starting Resin network configure service...
Starting Resin persistent logs...
Starting OpenSSH Key Generation...
[ OK ] Started IPv6 Packet Filtering Framework.
[ OK ] Started IPv4 Packet Filtering Framework.
[ OK ] Reached target Network (Pre).
[ OK ] Started Modem Manager.
[ OK ] Started Extract custom CA from config.json.
[ OK ] Started Resin persistent logs.
[ OK ] Started Resin network configure service.
Starting Resin NTP server configure service...
[ OK ] Started udev rules configuration from config.json.
[ OK ] Started OS SSH keys.
[ OK ] Started Resin NTP server configure service.
Starting Config.json watcher service...
Starting Resin NTP server configure service...
[ OK ] Started Config.json watcher service.
[ OK ] Started Balena device UUID.
Starting Resin Hostname Configuration...
[ OK ] Started NetworkManager configuration fragments from config.json.
Starting Network Manager...
[ OK ] Started Resin Hostname Configuration.
Starting Avahi mDNS/DNS-SD Stack...
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ OK ] Started Resin NTP server configure service.
[ OK ] Started Network Manager.
[ OK ] Reached target Network.
Starting DNS forwarder and DHCP server...
[ OK ] Started OS configuration update service.
Starting Resin init service...
[ OK ] Started DNS forwarder and DHCP server.
[ OK ] Started Resin init service.
Starting Balena Application Container Engine...
Starting Resin proxy configuration service...
Starting Hostname Service...
Starting Prepare OpenVPN...
[ OK ] Started Hostname Service.
[ OK ] Started Resin proxy configuration service.
Starting Network Manager Script Dispatcher Service...
[ OK ] Started Network Manager Script Dispatcher Service.
[ OK ] Started Prepare OpenVPN.
[ OK ] Started OpenVPN.
[ OK ] Started OpenSSH Key Generation.
[ OK ] Started Balena Application Container Engine.
Starting Balena supervisor...
[ OK ] Started Balena supervisor.
[ OK ] Started Balena supervisor updater.
[ OK ] Stopped OpenVPN.
Starting Prepare OpenVPN...
[ OK ] Started Prepare OpenVPN.
[ OK ] Started OpenVPN.
[ OK ] Stopped Balena supervisor.
[ OK ] Started libcontainer containe…3bb0ef3dcf90438fa6d253e37982757c4.
[ OK ] Stopped OpenVPN.
Starting Prepare OpenVPN...
[ OK ] Started Prepare OpenVPN.
[ OK ] Started OpenVPN.
[ OK ] Stopped OpenVPN.
Starting Prepare OpenVPN...
[ OK ] Started Prepare OpenVPN.
[ OK ] Started OpenVPN.
[ OK ] Stopped OpenVPN.
Starting Prepare OpenVPN...
[ OK ] Started Prepare OpenVPN.
[ OK ] Started OpenVPN.
[ OK ] Stopped OpenVPN.
Starting Prepare OpenVPN...
[ OK ] Started Prepare OpenVPN.
[ OK ] Started OpenVPN.
Starting Balena supervisor...
[ OK ] Started Balena supervisor.
[ OK ] Started libcontainer containe…10276f48084f412e463aeff5289ae5b3c.
[ TIME ] Timed out waiting for device /dev/serial1.
[DEPEND] Dependency failed for Configu…luetooth Modems connected by UART.
[ TIME ] Timed out waiting for device /dev/zram0.
[DEPEND] Dependency failed for Enable …pressed swap in memory using zram.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Container with balenOS starts but does not connect to balenCloud.
In addition to “resin/resinos:2.75.0_rev1-raspberrypi3” I tried “resin/resinos:2021.01.0-raspberry-pi” the result is the same.
I connected to the container and checked if it picked up the config file. And yes the config file copied correctly to volume. (checked this with the command cat/mnt/boot/config.json
)
I saw the topic: balenaOS in a docker container won´t connect to balenacloud. But there eventually @knaps97 changed the operating system to 64 bit, but I can not do it.
docker --version
Docker version 20.10.6, build 370c289
bash-5.0# balena-engine version
Client:
Version: 19.03.18
API version: 1.40
Go version: go1.12.17
Git commit: 840aacc77b6c600b3b929fe9e4d9356a322b9e5b
Built: Wed Apr 28 11:01:15 2021
OS/Arch: linux/arm
Experimental: false
Server:
Engine:
Version: 19.03.18
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: 840aacc77b6c600b3b929fe9e4d9356a322b9e5b
Built: Wed Apr 28 11:01:15 2021
OS/Arch: linux/arm
Experimental: true
containerd:
Version: 1.2.0+unknown
GitCommit:
runc:
Version: 1.0.0-rc4+dev
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
balena-engine-init:
Version: 0.13.0
GitCommit: 949e6fa-dirty
Thanks for helping