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.
It says tables dont exist. I have read the docker doc but i dont get it.
The table are not created.
WHAT AM I DOING WRONG?
my dockerfile
FROM php:7.1-apache
RUN docker-php-ext-install pdo pdo_mysql
COPY ./dump.sql /docker-entrypoint-initdb.d/
my docker-composer
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
and my dump.sql has
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;