Can I run a command inside a Docker container from another container?

Here is my script.

I have 2 docker containers:

  • C1: a container with Ruby (but maybe something else) that prepares data files on which it must perform calculations in the Julia language.
  • C2: a container with Julia (or R or Octave ...) used to perform the calculation to avoid installing Julia on the same system or container that runs Ruby code

From the host, obviously, I have no problems with processing. Usually, when two containers are connected (or belong to the same network), they exchange data with each other through a network that opens some kind of door. In this case, Julia does not open the door.

Can I run a command on C2 from C1, similar to what was done between the host and C2? If so, how?

Thank!

+4
1

, , , , .

Docker CLI - Docker, /var/run/docker.sock . , CLI, . (C1) , -. , ; "" , ( ) /var/run/docker.sock . , Docker , . . API Docker CLI , , ( ), JupyterHub + DockerSpawner, -, .

, , Julia /. , Julia "" ?

+2

Source: https://habr.com/ru/post/1695495/


All Articles