title: Warning: require_once(/var/www/html/wp-config.php): failed to open stream: No such file or directory
body: <p>I have been working on the following program from the last 6 hours using previous post on this issue without success. I'm currently working on a WP site on top of a Docker boiler plate. When I run <code>docker-compose up</code> and navigate to <code>localhost:8080</code> I get the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/SWOpb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SWOpb.png" alt="enter image description here"></a></p>
  
  <p>On the server side I get the following Warning:</p>
  
  <pre><code>mysql_1       | 2018-06-12T20:03:03.976722Z 0 [Note] mysqld: ready for connections.
  mysql_1       | Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
  wordpress_1   | WordPress not found in /var/www/html - copying now...
  wordpress_1   | WARNING: /var/www/html is not empty - press Ctrl+C now if this is an error!
  </code></pre>
  
  <p>wp-load.php:</p>
  
  <pre><code>/** Define ABSPATH as this file's directory */
  if ( ! defined( 'ABSPATH' ) ) {
      define( 'ABSPATH', dirname( __FILE__ ) . '/' );
  }
  
  error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
  
  /*
   * If wp-config.php exists in the WordPress root, or if it exists in the root and wp-settings.php
   * doesn't, load wp-config.php. The secondary check for wp-settings.php has the added benefit
   * of avoiding cases where the current directory is a nested installation, e.g. / is WordPress(a)
   * and /blog/ is WordPress(b).
   *
   * If neither set of conditions is true, initiate loading the setup process.
   */
  if ( file_exists( ABSPATH . 'wp-config.php') ) {
  
      /** The config file resides in ABSPATH */
      require_once( ABSPATH . 'wp-config.php' );
  
  } elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) &amp;&amp; ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
  
      /** The config file resides one level above ABSPATH but is not part of another installation */
      require_once( dirname( ABSPATH ) . '/wp-config.php' );
  
  } else {
  
      // A config file doesn't exist
  
      define( 'WPINC', 'wp-includes' );
      require_once( ABSPATH . WPINC . '/load.php' );
  
      // Standardize $_SERVER variables across setups.
      wp_fix_server_vars();
  
      require_once( ABSPATH . WPINC . '/functions.php' );
  
      $path = wp_guess_url() . '/wp-admin/setup-config.php';
  
      /*
       * We're going to redirect to setup-config.php. While this shouldn't result
       * in an infinite loop, that's a silly thing to assume, don't you think? If
       * we're traveling in circles, our last-ditch effort is "Need more help?"
       */
      if ( false === strpos( $_SERVER['REQUEST_URI'], 'setup-config' ) ) {
          header( 'Location: ' . $path );
          exit;
      }
  </code></pre>
  
  <p>docker-compose.yml </p>
  
  <pre><code>wordpress: # name of our wordpress container
      depends_on: # container dependencies that need to be running first
        - mysql
      # image: wordpress:latest # image used by our container
      image: wordpress:4.9.6-php7.0 # image used by our container
      ports:
        - "8080:80" # setting our ports for networking
      restart: always
      volumes: # this is where we tell Docker what to pay attention to
        - ./app/wp-content:/var/www/html/wp-content # mapping our custom theme to the container
        - ./app/wp-config.php:/var/www/html/wp-config.php # map our plugins to the container
      networks:
        - back
  </code></pre>
  
  <p>Can't seem to find what the issue is?</p>