title: Laravel Docker Container not connecting to local mysql
body: <p>I have an issue connecting to mysql running in the local machine in my DockerFile i have mentioned </p>
  
  <pre><code>FROM php:7
  RUN apt-get update -y &amp;&amp; apt-get install -y openssl zip unzip git
  RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  RUN docker-php-ext-install pdo mbstring pdo_mysql
  WORKDIR /home
  COPY . /home
  RUN composer install --ignore-platform-reqs
  
  CMD php artisan serve --host=0.0.0.0 --port=8081
  EXPOSE 8081
  </code></pre>
  
  <p>and this in my .env configuration</p>
  
  <pre><code>DB_HOST=localhost
  DB_DATABASE=databasename
  DB_USERNAME=root
  DB_PASSWORD=testpassword
  </code></pre>
  
  <p>I have very less clue about where it is failing. Do i need to install mysql for Docker container also?</p>