Persistent data across multicontainers


#1

I have used within a container the /data path for persistent data across reboots, eg logs. I know that this mount is associated with my container from the point of view of the host
balenaOS.

Now that I’m using a multicontainer solution, how do I exchange data that I want to persist between containers across reboots? Eg, container one captures frames from a camera and sends them to container two.


#4

Hey @jason10,

You can achieve this by using something called named-volume.

Take a look at this docker-compose.yml file as reference:

You have a volume:

volumes:
  data-volume:

And on each container, you add - data-volume:/containers-shared

Hope this helps!
Cheers


#5

Also worth having a look at the documentation for named volumes: