title: how get env variables from docker in symfony yml config file
body: <p>in docker-compose.yml:</p>
  
  <pre><code>mysql:
    image: mysql:latest
    container_name: mysql
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=symfony
      - MYSQL_USER=symfony
      - MYSQL_PASSWORD=symfony
  </code></pre>
  
  <p>how i can get this variables in yml config file:</p>
  
  <pre><code>parameters:
      database_host: 172.17.42.4
      database_port: 3306
      database_name: symfony
      database_user: symfony
      database_password: symfony
  </code></pre>
  
  <p>in $_SERVER they are fetch like:</p>
  
  <pre><code>$_SERVER["SYMFONY_MYSQL_ENV_MYSQL_DATABASE"],
  $_SERVER["SYMFONY_MYSQL_PORT_3306_TCP_ADDR"],
  $_SERVER["SYMFONY_MYSQL_ENV_MYSQL_PASSWORD"],
  $_SERVER["SYMFONY_MYSQL_ENV_MYSQL_USER"]
  </code></pre>