copy file to hostos - cellular modem config file

is there a possibility to copy a file from container-install-process to the host-os?

i’m searching for a way to copy “cellular” file (for modem settings) to “/mnt/boot/system-connections”

all ways with copy in the dockerfile failed, cause the copy only inside the container…?

BR Bernd

1 Like

hey, @projecttwo

if the cellular connection setup is known beforehand you can configure the image itself (much like you would configure wifi), see Network Setup on balenaOS 2.x - Balena Documentation

If this needs to happen at runtime, you can refer to Network Setup on balenaOS 2.x - Balena Documentation (on the same page)

thanks for your answer.

the problem with the process while flashing is that i have to do additional steps after flashing the original img-file, on balenafin its also a little more tricky, because i cannot insert easily the sdcard…

so i am searching for a process while service (docker) installation…

is there a way to copy to a destination outside the docker-container?

Hi there, there isn’t a way to do that automatically, and you will still have to do it after the device boots up, so the best approach for this is what Robert suggested above. Also, I don’t see why you need to do additional steps after flashing, this can automatically happen once the device is booted and the containers start up. You can also use balena CLI Documentation - Balena Documentation to preload your application, so it can start without a connection, and one of the containers inside your app can initialize the connection afterwards, or you can use something like GitHub - balena-io/wifi-connect: Easy WiFi setup for Linux devices from your mobile phone or laptop

You could potentially use the Balena CLI to accomplish this with SSH - not sure if you can do that on-device though through a container. Someone from Balena should be able to comment.

There is the following project which we’ve used in the past to update config.json remotely: GitHub - balena-io/configizer: Safe(r) balenaOS config.json updates remotely