Currently my project is running on raspberry pi devices. I am wondering if I can run the application (balena supervisor and my application containers) as docker containers on an appliance. Do I need balenaOS in order to run the balena supervisor?
Hi Patrick,
It’s technically possible to run supeervisor without balenaOS. But you would need to figure out a bunch of parameters to start it. Here’s a quick reference to how it’s configured in balenaOS:
I would suggest running balenaOS in a container instead, which should be much easier.
Using the NUC image (e.g. resin/resinos:2.46.0_rev1-intel-nuc) on x86 machines usually works well.
Thanks for your reply. I tried the balenaos-in-container but ran into problem. What I did was:
created a new application with device type Intel NUC.
downloaded the config.json file for device type Intel NUC.
on the docker running on windows (for my testing), I created a container using command
.\balenaos-in-container.ps1 -image resin/resinos:2.46.0_rev1.dev-intel-nuc -id test -c “$PWD\config.json” -detach
dockers logs -f shows
[FAILED] Failed to start Balena Application Container Engine.
See ‘systemctl status balena.service’ for details.
[ OK ] Stopped Balena Application Container Engine.
[ OK ] Closed Docker Socket for the API.
Stopping Docker Socket for the API.
Starting Docker Socket for the API.
[ OK ] Listening on Docker Socket for the API.
Starting Balena Application Container Engine…
[FAILED] Failed to start Balena Application Container Engine.
See ‘systemctl status balena.service’ for details.
[ OK ] Stopped Balena Application Container Engine.
[ OK ] Closed Docker Socket for the API.
Stopping Docker Socket for the API.
[FAILED] Failed to listen on Docker Socket for the API.
See ‘systemctl status balena-engine.socket’ for details.
[DEPEND] Dependency failed for Bale… Application Container Engine.
[ TIME ] Timed out waiting for device /dev/ttyS0.
[DEPEND] Dependency failed for Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes…
[ OK ] Started Update UTMP about System Runlevel Changes.
On the balena.io dashboard, it didn’t show any device attached to the application.
Opened a bash shell to the balena os docker and got this error when running “balena image ls”
bash-4.4# balena image ls
Cannot connect to the balenaEngine daemon at unix:///var/run/balena-engine.sock. Is the balenaEngine daemon running?
Hi, the first thing to check is that you have fulfilled all the prerequisites https://github.com/balena-os/balenaos-in-container#prerequisites. Assuming that, on the device, I’d take a look at the logs so can you post the output of journalctl --no-pager --unit balena.service to see if it has any clues?
Recently Docker released new versions of Docker for Windows and Mac that no longer supports AUFS. Unfortunately some of our images still depend on AUFS because they predate the creation of the overlay and overlay2 drivers. We are actively working to migrate our images to support overlay2. The last version of Docker Desktop for Windows with AUFS support was 18.06.1-ce-win74 - until we have migrated all our images we suggest downgrading Docker Desktop or building inside an Ubuntu virtual machine which still supports AUFS.
Hi Patrick. have you tried using the latest version of the project, specifically the section on windows https://github.com/balena-os/balenaos-in-container#windows which also includes a migration script to convert the NUC image from AUFS to overlayFS, so the problems with AUFS drivers missing should not be a problem anymore either. Could you pull the latest from that repo and try run : PS> .\balenaos-in-container.ps1 -image resin/resinos:2.46.0_rev1.dev-intel-nuc -id test -c "$PWD\config.json"
I found out my problem is caused by the aufs2overlay file. It is in dos format and it failed to run on linux. After I converted the file to unix format and everything is working.
Thats great to hear and thanks for letting us know. Would you mind raising an issue on the repo of that project so we can get the fixed for future users