0

Is it possible to call a command inside docker which belongs to another container.

An example would be:

php container which contains php app container which contains nginx

I would like to somehow share the php executable inside the nginx container.

Currently I have tried sharing the volumes with no luck.

Any ideas?

MaximusN
  • 29
  • 1
  • 3
  • No; containers are isolated from each other and one container can't directly run a binary in another. While the question I linked to mentions some very specific tools, its answer goes through the possible solutions. In this particular case, running PHP-FPM in a separate container and using nginx's `fastcgi_pass` directive to forward requests to it is probably the best practice. – David Maze Jul 24 '20 at 11:15
  • Thankyou for your reply, I got the clarification I needed. – MaximusN Jul 24 '20 at 12:01

0 Answers0