balenaOS image problem with custom script

Im new to balena cloud, right now im trying to create a script that install chromium and when i make it start at the boot of the device.
until i have done this:

  • created the fleet
  • add device
  • download of provisioned raspberrypi4 image on sd card with balena etcher
  • start the raspberry with the newly flashed sd
  • on my system in the project folder i launch “balena push [name of the fleet]”

when reboot the device, in the console of the device in balena cloud i see that it try to open chromium but it return error.

my question is: when i launch “balena push” am i deploying a container or an “update of the Host OS (that i suppose is my raspberrypi OS)”? if it is a container is it the correct way to do it?

Hello, when you use “balena push” you are deploying containers (a release) to your fleet. (For the details, see Deploy to your fleet - Balena Documentation) To update the HostOS, (which is balenaOS) you can use the dropdown in the “settings” menu of the device in your balenaCloud dashboard. It sounds like you have the process down correctly. What error are you getting when the device tries to open Chromium?

it was something related to not being able to access the display of the raspberry was conneted to, but by searching more on internet i have resolved it, now what i dont understand is this:
in my dockerfile where i have the CMD line i start the script to open chromium, but when i turn off the raspberry and then turn it on it doesnt start the script to open chromium, while when i launch it directly from the console of the container the script does work.
what could cause this malfunction of the script? because from what i know if i shut down the raspberry the containers should stop and then when i turn it back on the container should restart and launch the CMD command

ps maybe i typed something wrong in the dockerfile, what i want to know is if there could be some other reasons

1 Like

Can you post your CMD line or Dockerfile so we can take a look?