In docker, if you enter one of the containers, how do you use the service to the other container?

  docker, question

For example, i have multiple containers mysql php-fpm php-cle redis and other four containers.

Now I have this demand,
For example, I need to execute a PHP file on the cli command line. Mysql redis is required for this file.
At this time, if I enter the PHP container to execute the command, I will not find mysql and redis services.
What to do at this time. How does DOCKER deal with this problem?

Do you want to access mysql and redis containers in php containers? The simplest way is to use it when starting the php container.docker run -link redis:redis --link mysql:mysql.