tomsik68 / docker-xampp

Dockerfile to build an image containing XAMPP(MySQL + PHP + PHPMyAdmin) running on Debian system with SSH server
https://hub.docker.com/r/tomsik68/xampp/
MIT License
197 stars 109 forks source link

Happy work next version with these features as these years work practice #42

Open avenCN opened 2 years ago

avenCN commented 2 years ago

For more than 6 years, I have used lamp in many projects in lareville 5-9.

Yesterday, I wanted to use docker it break to install xampp on different servers many times. I tried this picture and it worked well.

Some requirements:

  1. Support different ports of different projects, which is easy to set

For example, 80:80 - > a project 81:81 - > B project 82:82 - > C project

For example, Apache / cond is currently used. D works, but httpd. Conf needs to be configured listen with different ports.

  1. Support setting MySQL data path, because data will not be lost

For example, / aven / database / MySQL - > / opt / lampp / var / MySQL

  1. Support redis and set the redis save path

Running xampp with docker will automatically start Apache, MySQL and redis

tomsik68 commented 2 years ago

Hi, I'm glad you like the image! I'll try to answer your requests to the best of my knowledge:

Support different ports of different projects, which is easy to set

Starting multiple instances of docker-xampp gives you one port per project. If you want to share the same container for multiple projects, you can just put them each in its own folder.

You can also feel free to replace the httpd conf as you're suggesting, but I don't think I can provide a nicer interface for that. I guess you can modify the Dockerfile to copy a custom file to httpd.conf.d.

Support setting MySQL data path, because data will not be lost

I agree this would be useful. Do you have any idea how to do it? I think I need to add /opt/lampp/var/mysql to volumes.

Support redis and set the redis save path

We're tracking redis in #38 . I said it's a nice-to-have which I won't do myself. However, I'd be happy to accept a patch for it.