Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I insert data into db after auto install? #4

Open
me-kou opened this issue Nov 18, 2019 · 0 comments
Open

How can I insert data into db after auto install? #4

me-kou opened this issue Nov 18, 2019 · 0 comments

Comments

@me-kou
Copy link

me-kou commented Nov 18, 2019

Thanks for your docker-modx repository! it helps me a lot.

Now I want to source my mysql dump file after auto install in docker enviroment.
I was successful in command as follow, but I want to run it auto instead of manually..

mysql -u root -h 127.0.0.1 -P 13307 --protocol=tcp -p
password:
use modx;
source my.sql

This is what I've tried

  1. make a directory as 「docker-entrypoint-initdb.d」 in mariadb directory
  2. put my mysql inside the 「docker-entrypoint-initdb.d」 directory.
  3. edit Dockerfile inside mariadb as follow
FROM mariadb:10.1.38-bionic
COPY ./docker-entrypoint-initdb.d/ ./docker-entrypoint-initdb.d/

But it doesn't work..
What should I do so that I can insert my dump date into running container ?

I am looking forward to your reply! Thank you guy !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant