Docker Community Forums

Share and learn in the Docker community.

How to launch calculations in one docker container from another one and get the result of calculations

I have three docker containers that connected via docker-compose.

The first one (A) is a nginx proxy which catchs all network request and proxy it to the second container (B). Container B is a nodejs web server.

Container B gets some data from users and after that, I need to start some hard calculations. The soft which make these calculations locates in container C. I can share all data between B and C using docker volumes it is not a problem. But I don’t know how to launch the calculations from container B and how to know when container C will finish.

What’s container C? It is a container with some soft which can be launched using the command from the terminal. For example, supersoft start ./path/to/data . During the running of the supersoft it prints some info to the console (which can be very useful for the user in container B). After the calculating supersoft just finish and that’s all.

The question is how to create a normal architecture and what is the normal way for it?

This is a private default internal network created by docker on the host. So, all containers get an internal IP address and these containers can access each other, using this internal IP. The Bridge networks are usually used when your applications run in standalone containers that need to communicate.

So I need to add nginx in both containers B and C?

The question is still actual.