{"id":27204355,"url":"https://github.com/tomsik68/docker-xampp","last_synced_at":"2025-05-16T14:08:17.747Z","repository":{"id":41203213,"uuid":"39191648","full_name":"tomsik68/docker-xampp","owner":"tomsik68","description":"Dockerfile to build an image containing XAMPP(MySQL + PHP + PHPMyAdmin) running on Debian system with SSH server","archived":false,"fork":false,"pushed_at":"2024-11-26T19:18:24.000Z","size":49,"stargazers_count":206,"open_issues_count":10,"forks_count":110,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T22:58:03.715Z","etag":null,"topics":["docker","dockerfile","mysql","php"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/tomsik68/xampp/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomsik68.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-16T10:46:38.000Z","updated_at":"2025-04-08T21:36:05.000Z","dependencies_parsed_at":"2024-05-11T09:45:35.407Z","dependency_job_id":null,"html_url":"https://github.com/tomsik68/docker-xampp","commit_stats":{"total_commits":56,"total_committers":7,"mean_commits":8.0,"dds":0.4464285714285714,"last_synced_commit":"76e56f6ea99d721ece0ae45cd01c063c65ab08ec"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomsik68%2Fdocker-xampp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomsik68%2Fdocker-xampp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomsik68%2Fdocker-xampp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomsik68%2Fdocker-xampp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomsik68","download_url":"https://codeload.github.com/tomsik68/docker-xampp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125577,"owners_count":21051767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dockerfile","mysql","php"],"created_at":"2025-04-09T22:58:07.993Z","updated_at":"2025-04-09T22:58:08.478Z","avatar_url":"https://github.com/tomsik68.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/tomsik68/docker-xampp/docker-image.yml?style=for-the-badge\u0026label=Docker%20Image%20CI)\n[![Docker Pulls](https://img.shields.io/docker/pulls/tomsik68/xampp?style=for-the-badge)](https://hub.docker.com/r/tomsik68/xampp/)\n[![Static Badge](https://img.shields.io/badge/XAMPP%20version-8.2.12-A?style=for-the-badge\u0026link=https%3A%2F%2Fwww.apachefriends.org%2F)](https://www.apachefriends.org)\n\n\n| PHP version | Corresponding tag |\n--------------|---------------------\n| 8.2.12 | `tomsik68/xampp:8`|\n| 7.4.33 | `tomsik68/xampp:7` |\n| 5.6.40 | `tomsik68/xampp:5` |\n\nFor PHP 8, start your container like this:\n```bash\ndocker run --name myXampp -p 41061:22 -p 41062:80 -d -v ~/my_web_pages:/www tomsik68/xampp:8\n```\n\ndocker-xampp\n===\n\nThis image is intended for PHP+MySQL development. For convenience, it also runs SSH server to connect to. __Both MySQL and phpmyadmin use default XAMPP password__.\n\n## Any questions?\n\nPlease read this readme before asking anything.\n\nIf you didn't find answer to your question, [create an issue](https://github.com/tomsik68/docker-xampp/issues) or just [ask on Gitter](https://gitter.im/docker-xampp/community). I'll try to help if I can!\n\n## Running the image\n\nThis image uses /www directory for your page files, so you need to mount it.\n\n```\ndocker run --name myXampp -p 41061:22 -p 41062:80 -d -v ~/my_web_pages:/www tomsik68/xampp\n```\nThe command above will expose the SSH server on port 41061 and HTTP server on port 41062.\nFeel free to use your own name for the container.\n\nTo browse to your web page, visit this URL: [http://localhost:41062/www](http://localhost:41062/www)\nAnd to open up the XAMPP interface: [http://localhost:41062/](http://localhost:41062/)\n\n## Default credentials\n\nservice | username | password\n------- | -------- | ---------\nssh     | root     | root\n\n## Additional How-tos\n\n### My app can't function in `/www` folder\n\nNo problem, just mount your app in the `/opt/lampp/htdocs` folder, for example:\n\n```\ndocker run --name myXampp -p 41061:22 -p 41062:80 -d -v ~/my_web_pages:/opt/lampp/htdocs tomsik68/xampp\n```\n\n### ssh connection\n\ndefault SSH password is 'root'.\n\n```\nssh root@localhost -p 41061\n```\n\n### get a shell terminal inside your container\n\n```\ndocker exec -ti myXampp bash\n```\n\n### use binaries provided by XAMPP\n\nInside docker container:\n```\nexport PATH=/opt/lampp/bin:$PATH\n```\nYou can then use `mysql` and friends installed in `/opt/lampp/bin` in your current bash session. If you want this to persist, you need to add it to your user or system-wide `.bashrc` (inside container).\n\n### Use your own configuration\n\nIn your home directory, create a `my_apache_conf` directory in which you place any number of apache configuration files. As soon as they end with the `.conf` extension, they will be used by xampp. Make sure to use the following flag in your command: `-v ~/my_apache_conf:/opt/lampp/apache2/conf.d`, for example:\n\n```\ndocker run --name myXampp -p 41061:22 -p 41062:80 -d -v ~/my_web_pages:/www  -v ~/my_apache_conf:/opt/lampp/apache2/conf.d tomsik68/xampp\n```\n\n### Restart the server\n\nOnce you have modified configuration for example\n```\ndocker exec myXampp /opt/lampp/lampp restart\n```\n\n### phpmyadmin\n\nIf you used the flag `-p 41062:80` with `docker run`, just browse to http://localhost:41062/phpmyadmin/ .\n\n### Docker compose example\n```\nversion: '3.8'\n\nservices:\n  xampp:\n    image: tomsik68/xampp\n    ports:\n      - \"44162:22\"\n      - \"41063:80\"\n    volumes:\n      # Mount your web pages\n      - ./xampp/my_pages:/www\n      # Mount your apache configuration\n      - ./xampp/my_apache_conf/:/opt/lampp/apache2/conf.d\n      #Save MySQL data to be persistent\n      # add the dbs as needed\n      - ./xampp/mysql/mydb:/opt/lampp/var/mysql/mydb\n    restart: always\n```\n\n## Use a Different XAMPP or PHP Version\n\nCurrently, the Docker image is built only for PHP 5, 7 and 8.\nIf you need another version, you can easily build a Docker image yourself, here's how:\n\n1. Clone this repo (local clone is sufficient, no need to fork)\n2. Find the URL to a URL to your desired version. List of versions can be found here: https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/\n3. Build the image using e.g. `docker build --build-arg XAMPP_URL=\"https://www.apachefriends.org/xampp-files/5.6.40/xampp-linux-x64-5.6.40-1-installer.run?from_af=true\" .`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomsik68%2Fdocker-xampp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomsik68%2Fdocker-xampp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomsik68%2Fdocker-xampp/lists"}