Code Monkey home page Code Monkey logo

Comments (1)

sanslash332 avatar sanslash332 commented on August 10, 2024

Hello! I have to retreat of my previews issue, because really isn't a problem have the socket on the same folder than the db-data.

So, if you want to use... for example a bind mount,, OK is correct separate the socket and pid from the data it self, but that has the drawback that on mount time the current populated data on the container will by overwriten with the data of the host. And well if you mount a empty folder your database will start empty, that give to you problems because the basic data structure of mysql will be unexistent and with that the database will doesn't work.

This can be util only when you have a existing database data on your host machine and you want to use it directly on the container.

But, well. for a default behavior for have a persistent database on time, you just need to have a named volume mounted on /opt/lampp/var/mysql

example:

docker run -v "db:/opt/lampp/var/mysql" -v "/var/www:/opt/lampp/htdocs/www" -p "8080:80" tomsik68/xampp

And this will work.

If you destroy your container and next restart it. or start a different instanse of it but mounting the same named volume (db) all your old data will keep and still works.

Could be cool put this information on the readme :-)

Thanks.

from docker-xampp.

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.