I´m trying to setup two docker container with docker-compose, using this yml:
version: '3.5'
services:
db:
image: mysql:5.7
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: abc
MYSQL_DATABASE: shopsystem
MYSQL_USER: shoppingsystem
MYSQL_PASSWORD: abc
volumes:
- ./test.sql:/docker-entrypoint-initdb.d/test.sql
- db_data:/var/lib/mysql
backend:
build:
context: ./nodeserver
dockerfile: Dockerfile
image: node-test
container_name: servernode-1
ports:
- 8084:8082
volumes:
db_data: {}
The test.sql is on the root level like the docker-compose.yml
When I start the docker-compose
docker-compose up
I get the following error:
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/test.sql
ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.
I already read some threads about that problem, but I can not solved it.
I clean the volumes with the following command:
docker-compose down -v
I`m using Windows with dockertoolbox to run docker-compose.
Can someone help me?