Answer the question
In order to leave comments, you need to log in
How to share files between containers in Docker Compose?
There was such an academic problem, for which I can not find a solution in any way. There are 2 applications written in Java (2 jar archives). One jar calls within itself methods from another jar. You need to write them into different Docker containers and run them through Docker-compose.
Now the immediate question is: how can this be run on docker using Docker-compose? I tried to prescribe volume in different ways, so far nothing has helped. Ideally, you want files to be transferred inside the docker bypassing the host machine. But as an option, you can make a shared folder on the host.
According to the second option, it turned out only to make a folder and manually throw 2 JAR files there, but then there is no need for a second container. But it didn’t work to make the containers themselves drop their JAR files there when launched with the docker-compose up command, and then start up.
Tell me, how can this be done? What are the other options for solving the problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question