Currently I got a fairly big monolithic balena image which is using systemd to run various services. This works as expected, but it would be nice to split it up into several smaller containers.
The split up would create the following:
One-to-many containers which would contain data only ( not a named volume and not a bind volume )
One-to-many containers which would contain self-contained services
One container for the main application mounting data from data only containers
The main issue from these requirements are the data only container. The balena documentation states that the balena backend only supports a subset of the docker-compose version 2.1. This subset does not support volumes_from docker-compose field which seems to be the field to use in order to share data between containers.
I have done some named volume experiments based on the multicontainer-getting-started.
The experiments include named volumes which are mounted as show in:
Multi containers using named volumes for data sharing
Is named volumes show in the above docker-compose how data should be shared between containers? Unsure if this method introduce data race condition depending on which contain starts first. Additionally it seems the any data pointed to the named volume will be copied and not mounted. May be an issue for larger data amounts.
Is there any plan to support volumes_from?
Is there a more optimal way to perform data shared between multi containers?