Wifi-connect multi container setup

Im trying to set up wifi-connect and combine it with the balena-node-red-mqtt-nginx-TIG-stack repo.

However, when trying to build using balena push I get the error;

[wifi-connect]   Step 1/6 : FROM balenalib/%%BALENA_MACHINE_NAME%%-debian
[wifi-connect]   invalid reference format: repository name must be lowercase

Please note that I’ve replaced RESIN with BALENA in this instance, matching the documentation, however, the results are the same. If I update this, however, to raspberrypi3 for machine name and armv7hf for arch, the build works.

What could be the reason that the variable doesn’t get resolved?

Hi, to be able to use variables the Dockerfile needs to have a .template extension: Dockerfile.template. Please let us know how that works for you.

Silly me, template indicated that it was to be customized for me. Thank you!

Hi, I’m a beginner on balena, could you please share the github project that I need to use to deploy wifi-connect as a multi container setup on top of an existing container. I’ve deployed balena os with the image of Raspberry Pi 3 and configured WiFi, subsequently did a push of Screenly and now I need to move the Raspberry to another location where the WiFI is different, my first attempt of modifying the resin-sample file was not possible as when trying to save states is a read only file system. Then looked at deploying WiFi-connect for that purpose but when I did the push Screenly app stopped working and WiFi-connect started working. Help will be appreciated to allow the WiFi configuration to work without impacting the Screenly application so I can be able to move my Raspberry to a different physical location.

Hey @atruji77, we are checking with a team, and if we don’t have an example yet, definitely would be good to have indeed.

Modifying the wifi setup on the device is possible in the host OS though, those settings are not in the “read only” section of the OS, but in a read-write state section. The issue might have been, that the settings that are by default placed on the boot partition are copied on every boot to the state partition, thus if you modify the latter, it will be overwritten by the original setting at the former location. Thus, if you want to do the manual edit, you can do a modification of the file at /mnt/boot/system-connections (or can even make a copy of the file, and modify that, so that your device can connect at both locations, if that’s something that you find useful). Does this help you this one time?

hey @atruji77, actually found some examples. Both this project:

and this:

have a service that you can extract to add to your multicontainer project.

On the other hand, looking at the Screenly project:

a) it is not a multicontainer project, so would need to wrap that up as a multicontainer environment as well, to use these examples
b) you might not need this at all, it seems that they have integrated wifi-connect already? It is worth asking Screenly’s support or forums, as they seem to have some tools that use wifi-connect, but not clear how.

Would love to hear if you get any information from them as well!