How to auto start wayland-base container in Torizoncore and run GTK application?

Hello all,
I was suggested to use TorizonCore for GTK application, which will run in debian based container, now I’m able to successfully run the GTK application inside container, but how to autostart this container and inside that how to autostart this GTK application in container, when IMX6DL boots up?

and one more problem is every times I restart the IMX6DL, my files in container are missing, so how to connect save files permanently in container so that stored will run automatically when system boots up?

regards,
Nolan

Hi @Nolan_Maverick ,

I’m able to successfully run the GTK application inside container, but how to autostart this container and inside that how to autostart this GTK application in container, when IMX6DL boots up?

In TorizonCore you can autostart a container (or a series of containers) after boot by putting a docker-compose.yml on /var/sota/storage/docker-compose/.

If you know how to setup the Compose YAML you’re set. If not, there are some options:

As for autostarting the GTK app, you can modify your Docker image to put the app as an entrypoint (Dockerfile reference | Docker Documentation) if the app is in a different container than Weston (the graphical interface) . This is already done by default in our project templates of the VSCode extension.

If you’re planning to run both Weston and the GTK app in the same container then you can modify the container entrypoint to run one after the other, like something similar to weston && app.

and one more problem is every times I restart the IMX6DL, my files in container are missing, so how to connect save files permanently in container so that stored will run automatically when system boots up?

This is an expected behavior of containers, all modifications you do in a running image will not be saved by default. What you can do is bind mount a directory to be inside the container. See more details here: Bind mounts | Docker Documentation.

Given that you have some general doubts about container concepts I suggest you read an overview on Docker: Docker overview | Docker Documentation

Best regards,
Lucas Akira