Relative Content

Tag Archive for dockerdocker-compose

Accessing and using files in a volume from multi-container apps

I am new to using Docker and would really appreciate any opinions on how to set this up/if Docker is appropriate for solving this problem. What I would like to do is to have the situation where multiple containers act as individual farms, that sell cows to a ‘market’ on a ‘market day’ as part of a larger daily ‘farm-life’ simulation. I have a simple python script that creates a .txt files of random sold animals, and these are written into a volume – and what I need is either another container/something else to do is keep track of how many ‘farms’ have written their files and sold the cows to the market, then once all farms have sold their selected cows to the market, send a file back to each farm to allow the simulation to continue with other parts. I also ideally need a way for this to happen multiple times, so for example the simulation would run for 365 days and cows would be sold and bought from the volume every week, so the containers need wait for each other before progressing. I’d be grateful for any ideas on how to set this up/if it is possible.

Docker compose weird issue can not pull images

In the image provided, it’s evident that I’ve been facing persistent issues while trying to execute Docker Compose. Despite attempting various solutions such as uninstalling and reinstalling Docker Desktop, pulling images (only official ones seem to work), and even pushing images, none of these efforts have resolved the problem. Specifically, when attempting to use Docker Compose, I encounter consistent failures.
enter image description here