title: Docker, referencing a different container. Call mysqldump using php command
body: <p>I've got a database backup bundle (<a href="https://github.com/dizda/CloudBackupBundle" rel="nofollow">https://github.com/dizda/CloudBackupBundle</a>) installed on a Symfony3 project using Docker, but I can't get it to work due to it either not finding PHP or not finding MySQL</p>
  
  <p>When I run <code>php app/console --env=prod dizda:backup:start</code> via exec, run, or via cron. I get mysqldump command not found error through the PHP image, or PHP not found error from the Mysql/db image. </p>
  
  <p>How do I go about running a php command that then runs a mysqldump command.</p>
  
  <p>My docker-compose file is as follows:</p>
  
  <pre><code>version: '2'
  services:
      web:
          # image: nginx:latest
          build: .
          restart: always
          ports:
              - "80:80"
          volumes:
              - .:/usr/share/nginx/html
          links:
              - php
              - db
              - node
          volumes_from:
              - php
          volumes:
              - ./logs/nginx/:/var/log/nginx
      php:
          # image: php:fpm
          restart: always
          build: ./docker_setup/php
          links:
              - redis
          expose:
              - 9000
          volumes:
              - .:/usr/share/nginx/html
      db:
          image: mysql:5.7
          volumes:
            - "/var/lib/mysql"
          restart: always
          ports:
              - 8001:3306
          environment:
            MYSQL_ROOT_PASSWORD: gfxhae671
            MYSQL_DATABASE: boxstat_db_live
            MYSQL_USER: boxstat_live
            MYSQL_PASSWORD: GfXhAe^7!
      node:
          # image: //digitallyseamless/nodejs-bower-grunt:5
          build: ./docker_setup/node
          volumes_from:
              - php
      redis:
          image: redis:latest
  </code></pre>
  
  <p>I'm pretty new to docker, so and easy improvements you can see feel free t flag...I'm in the trial and error stage!</p>