How can I deploy a single container in an multi container environment?

The docs state https://www.balena.io/docs/learn/develop/multicontainer/#multiple-containers

Because each service can be updated independently, larger applications can be developed and maintained by separate teams, each free to work in a way that best supports their service.

But I could not find a way to only build & deploy a single container. How can I do this?

Hi landor, not sure if I understand your question.
If you just need one container and you are using a docker-compose.yml you can always just define one service in that file.
If you are sure you are not going to use more than one service you can use a dockerfile or dockerfile.template in your project as described here https://www.balena.io/docs/learn/develop/dockerfile/ .

Hi and thanks for your answer.

The thing is that I have multiple containers running on the raspberry but I am develping always on only one. When I do balena push app all of the containers get build on the build server. Or at least all the images get downloaded to the build server, checked for changes and then cached layers are used. But anyway this takes time.

What I would like to do is to build & deploy ONLY a single container from my multi-container deployment without touching the others.

Thanks

Sounds like you are trying to streamline your development.

I am not aware that you can instruct the builder to take care of selected containers only.

Have you taken a look at local mode ( https://www.balena.io/docs/learn/develop/local-mode/ ) ? It might not be what you want as images are created locally and on a RPI that might be even slower than recreating the whole project but in the balena cli docu to push ( https://www.balena.io/docs/reference/cli/#push-applicationordevice ) I found this:

When pushing to a local device a live session will be started. The project source folder is watched for filesystem events, and changes to files and folders are automatically synchronized to the running containers. The synchronisation is only in one direction, from this machine to the device, and changes made on the device itself may be overwritten. This feature requires a device running supervisor version v9.7.0 or greater.

Local mode looks nice but for a different use-case. I am currently tying out buidtime / entrypoint things that can only be testet on original hardware.

I’ll just comment out my 3G container for now until fixed that problem.

Thank You.