Comments (1)
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)
- Access port mysql HOT 5
- How can I access /www of the container proFTPd ? HOT 2
- Happy work next version with these features as these years work practice HOT 1
- docker-compose.yml sample file
- Update to the latest XAMPP versions HOT 1
- [Question] Setting up DVWA on docker-xampp HOT 1
- how to install "ixed.8.1.lin" loader from the SourceGuardian site HOT 2
- Unknown command or add-on HOT 2
- How do I install a PHP module like IMAGICK? HOT 2
- I want to mount my php folder so i can open the page on it. HOT 13
- It does not copy the source files from the directory to the /www being mounted HOT 7
- XAMPP running as `daemon` user instead of `www-data` HOT 2
- Mount existing db to container HOT 2
- Mysql is not starting HOT 7
- disable mysql? HOT 2
- Add 8.3.6 HOT 2
- cant remap ports to container HOT 4
- denied HOT 1
- Path Problem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-xampp.