title: create tables on docker start
body: <p>I am new to docker, i have created my application and i want to send to another developer but i cant seem to run it running docker. </p>
  
  <p>It says tables dont exist. I have read the docker doc but i dont get it.</p>
  
  <p>The table are not created.</p>
  
  <p>WHAT AM I DOING WRONG?</p>
  
  <p>my dockerfile</p>
  
  <pre><code>FROM php:7.1-apache
  
  RUN docker-php-ext-install pdo pdo_mysql
  
  COPY ./dump.sql /docker-entrypoint-initdb.d/
  </code></pre>
  
  <p>my docker-composer</p>
  
  <pre><code>version: '2'
  
  volumes:
      logs:
          driver: local
  
  services:
      slim:
          build: .
          working_dir: /var/www
          command: php -S 0.0.0.0:8080 -t public
          environment:
              docker: "true"
          depends_on:
            - db-mysql
          ports:
              - 80:8080
          volumes:
              - .:/var/www
              - logs:/var/www/logs
          links:
            - db-mysql
  
      db-mysql:
        image: mysql
        restart: always
        container_name: db-mysql
        ports:
          - "3307:3306"
        environment:
          MYSQL_DATABASE: path
          MYSQL_ROOT_PASSWORD: root
          MYSQL_USER: root
          MYSQL_PASSWORD: root
        volumes:
          - ./mysql_init:/docker-entrypoint-initdb.d
          - ./dump.sql:/docker-entrypoint-initdb.d
  </code></pre>
  
  <p>and my dump.sql has</p>
  
  <pre><code>CREATE TABLE IF NOT EXIST `paths` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `lat` double DEFAULT NULL,
    `long` double DEFAULT NULL,
    `token` varchar(225) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
  </code></pre>