I have a dotnet core 7.0 c# applications:
- application called ping running in a container named ping.
- application called pong running in a container named pong.
Both containers are starting from the same yml and ping depends on pong…
Can I somehow from ping container execute pong application and get outputs?
Well, it’s the internet age, you would usually communicate over the network, via http(s) or (g)RPC to invoke functions.
thank you very much for your reply. but i’m old time developer
You can of course use the Docker API to like SSH into the container and execute programs.
But the more modern way would be to write a webserver for request/response for the application.
Compromise: write a little web server for application in the container to invoke the application locally and stream the result, so between containers you can still use http/s.
Not that old time, if you chose Docker I agree with @bluepuma77, but depending on what ping and pong does, you could simply share the same mounted folder with bot containers or share the process namespace if only processes communicate with eachother so one process can send a signal to another or you can combine these. For example ping container sends a signal to the pong process in the pong container in the shared process namespace and the pong container saves a file to a common volume. Or ping saves a file to a common folder and pong sends a signal to ping.
Without knowing more about ping and pong, I hope this makes sense to you. If not, please, share more info about ping and pong.