Git Product home page Git Product logo

Comments (4)

sameersbn avatar sameersbn commented on July 2, 2024

@a-nldisr There are a couple of ways you can do this

  1. You dump the dataset to an external mysql server and provide the database connection details while running the image via DB_HOST, DB_NAME, DB_USER and DB_PASSWORD environment variables.
  2. Second way is to build the image from the dockerfile. In the resources/redmine file on line 75-76 you will see that the database is created. You will need to add sql commands following that to allow remote access to the mysql server using the GRANT mysql command. Something similar to
GRANT ALL ON *.* TO 'root'@'172.17.%.%' IDENTIFIED BY '' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Save the changes, build and run the image. Following which you should be able to connect to the mysql server like so.

mysql -h container-ip-address -uroot

Personally I would like to have a robust solution to this feature, wherein you can specify a dump file while running the image and the container will import the provided dataset. But I dont think it is possible without mounting volumes and such. Right now I think the second option is more suited to your needs.

from docker-redmine.

sameersbn avatar sameersbn commented on July 2, 2024

@a-nldisr I can do one thing though, I could add a environment variable to configure the mysql server to allow remote connections. It is not done so by default for security reasons

from docker-redmine.

a-nldisr avatar a-nldisr commented on July 2, 2024

Currently i have a redmine project that has a deadline, to lighten the workload of setting up an development environment i was looking at Docker (and as added bonus: Learn Docker). However adding these steps to building a docker environment for just adding a data set complicates the quick setup i was looking for, the time i spend looking into docker specific actions i could have started a virtual machine. I still believe it would be a nice feature to load in your own data sets into the database with 1-2 commands.

For now im working again with a VM that i created for development purposes, i'll look at the suggested solutions in due time. Thanks for your time!

from docker-redmine.

sameersbn avatar sameersbn commented on July 2, 2024

@a-nldisr FYI, the root user is now assigned a randomly generated password when the image is run. This means that you can now ssh to container and dump the test database to the internal mysql server.

The first line of

docker log <container-id>

gives away the password for the root user. The assigned password is dynamic and changes every time the image is run/started.

from docker-redmine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.