3

I have following syntax in windows based docker enr. however when i run the

docker-compose up

it loads the container however don't load the dump file inside the dump file location given as the entry-point to the mysql process.

any ideas ? below is the my docker-compose.yml file.

mysql:
    image: mysql:latest
    volumes_from:
        - data
    environment:
        MYSQL_ROOT_PASSWORD: yxxxxr
        MYSQL_DATABASE: career_xxx
        MYSQL_USER: career_xxx
        MYSQL_PASSWORD: Ixxx8; 

data:
    image: mysql:latest
    #image: mysql:5.6
    #image: mysql:latest
    volumes:
        - ./.config/etc/mysql/dump:/docker-entrypoint-initdb.d
    command: "true"
9
  • Is dump a file or a folder? I think only sql extensions will be loaded. Commented Apr 8, 2016 at 14:23
  • yes, dump is a folder, and sql files are there, not getting loaded for somereason and there is no error. Commented Apr 9, 2016 at 4:00
  • Try use an absolute path Commented Apr 9, 2016 at 4:03
  • doesnt work, you can try this yourself see if this working isnt it ? dosnt work for me Commented Apr 9, 2016 at 4:25
  • Tried this on my machine and it works. Make sure you delete containers from previous docker-compose up first. Somehow if you have run it before, even though docker-compose says it is recreating the containers, it will not run the sql file. But when you start fresh it works. Commented Apr 9, 2016 at 5:19

1 Answer 1

0

As @warmoverflow pointed out its seems to be bug in the docker, you have to remove all the volumes out and then it will work.

//to remove all volumes (do this after every docker-composer up)
$ docker-compose rm -vf
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.