{"id":23709933,"url":"https://github.com/nxtlvlsoftware/docker-pmmp","last_synced_at":"2026-01-27T15:32:58.483Z","repository":{"id":110552979,"uuid":"232255822","full_name":"NxtLvLSoftware/docker-pmmp","owner":"NxtLvLSoftware","description":"Dockerfile \u0026 build steps for running a pmmp server.","archived":false,"fork":false,"pushed_at":"2020-06-26T23:17:22.000Z","size":86,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-30T06:21:35.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NxtLvLSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2020-01-07T06:13:26.000Z","updated_at":"2020-06-26T23:12:23.000Z","dependencies_parsed_at":"2023-04-07T20:31:05.879Z","dependency_job_id":null,"html_url":"https://github.com/NxtLvLSoftware/docker-pmmp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NxtLvLSoftware/docker-pmmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Fdocker-pmmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Fdocker-pmmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Fdocker-pmmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Fdocker-pmmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NxtLvLSoftware","download_url":"https://codeload.github.com/NxtLvLSoftware/docker-pmmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NxtLvLSoftware%2Fdocker-pmmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28815407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-12-30T18:58:56.358Z","updated_at":"2026-01-27T15:32:58.476Z","avatar_url":"https://github.com/NxtLvLSoftware.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-pmmp\nHosts the files used to build [nxtlvlsoftware/pmmp](https://hub.docker.com/repository/docker/nxtlvlsoftware/pmmp) \u0026 [nxtlvlsoftware/pmmp-phpstan](https://hub.docker.com/repository/docker/nxtlvlsoftware/pmmp-phpstan) docker images.\n\n## About\nThis repository contains the source for building a minimal docker image for running a [pocketmine](https://github.com/pmmp/PocketMine-MP)\nserver and an image for running static analysis on plugin source code using [phpstan](https://github.com/phpstan/phpstan).\n\nIf you're interested in building your own images, want to understand how everything works or just feel like reading\nsomething, you can take a look at the documentation for the pocketmine image [here](pocketmine-mp/README.md) and the\nphpstan image [here](phpstan/README.md).\n\n## Index\n* [What is docker?](#what-the-heck-is-docker)\n* [Running PocketMine](#running-pocketmine)\n    * [Quick start](#quick-start)\n        * [Required volumes](#required-volumes)\n        * [Mounting the volumes](#mounting-the-volumes)\n        * [Setting file permissions](#setting-file-permissions)\n        * [Starting the server](#starting-the-server)\n        * [Changing the port](#changing-the-port)\n    * [Run the server in the background](#run-the-server-in-the-background)\n        * [Reattaching to a server in the background](#reattaching-to-a-server-in-the-background)\n        * [Viewing background server logs](#viewing-background-server-logs)\n    * [Full Documentation](pocketmine-mp/README.md)\n* [Running phpstan](#running-phpstan-code-analysis)\n    * [Quick start](#quick-start-phpstan)\n        * [Required volume (source directory)](#required-volume)\n        * [Running the analysis](#running-the-analysis)\n            * [Resolving plugin dependencies](#resolving-plugin-dependencies)\n            * [Resolving composer dependencies](#resolving-composer-dependencies)\n        * [Custom phpstan configuration](#custom-phpstan-configuration)\n            * [Autoloading pocketmine](#autoloading-pocketmine)\n            * [Default configuration](#default-configuration)\n    \n\n## What the heck is docker?\nDocker lets you install software more easily by \"copying the whole machine over\".\nTo use Docker, you must be on a Linux/MacOS machine.\n(Docker also works on Windows, but trying to run Linux containers on Windows usually creates more problems than it solves.)\n\nTo install Docker, refer to the [official Docker docs](https://docs.docker.com/install/).\n\n## Running PocketMine\nThere are pre-built images avalible on [dockerhub](#link-coming) that you can install with the steps below or you may\nbuild your own images from a specific git tag by following the directions [here]().\n\n### Quick start\n__You do NOT need to clone this repo to install pocketmine via docker!__\n\nAlthough this is a quick start guide, you will still need to know how to run commands on a Linux/MacOS machine and\nalready have Docker installed.\n\n(If you prefer a more technical reference, there is [in-depth documentation](pocketmine-mp/README.md) available with the\nfull build instructions.)\n \n#### Required volumes\nThe pocketmine image uses two volumes for storing your servers data, `/data` (where things like server.properties, plugin\ndata, player data, etc. is stored) and `/plugins` where your .phar files are stored.\n\n#### Mounting the volumes\nIf you want to use existing directories or don't want the server data or plugins stored in the container you can mount\nthe directories from your host machine. First, make sure the directories `data` and/or `plugins` exist (you can create\nthem in your current working directory with `mkdir data plugins` \u0026 they can have any name you like).\n\n#### Setting file permissions\nSet the owner of these directories to user of UID `1000`. Docker containers identify file owners using the UID, so if your\ncurrent user is coincidentally also UID 1000 (you can check this with `echo $UID`), this operation might do nothing.\nOtherwise, you might need root access to change the owner of a directory:\n\n```bash\nsudo chown -R 1000:1000 data plugins\n```\n\n#### Starting the server\nYou can now start the server with the following command:\n\n```bash\ndocker run -it -v $PWD/data:/data -v $PWD/plugins:/plugins nxtlvlsoftware/pmmp:stable\n```\n\nIf your directories aren't named `data` or `plugins` you can replace `$PWD/data` and/or `$PWD/plugins` with the full/absolute\npath to your directories:\n\n```bash\ndocker run -it -v /home/user/server-1/data:/data -v /home/user/server-1/plugins:/plugins nxtlvlsoftware/pmmp:stable\n```\n\n#### Changing the port\nDo NOT change the server port in server.properties. If you want to open the server on another port (e.g. `12345` instead),\nstart the server with the following command:\n\n```bash\ndocker run -it -p 12345:19132 -v $PWD/data:/data -v $PWD/plugins:/plugins nxtlvlsoftware/pmmp:stable\n```\n(The second number is ALWAYS `19132`)\n \n### Run the server in the background\nTo run the server in the background, simply change `-it` to `-itd` in the commands above. This will run the server in\nthe background even if you close the console. (No need to `screen`/`tmux` anymore!)\n\nWhen you run this command, it will display the container name that runs the server, e.g. `admiring_boyd`, `bold_kilby`,\nor other random names.\n\n#### Reattaching to a server in the background\nTo open the console of a background server (reattach), run the following command:\n\n```\ndocker attach container_name\n```\n\nTo leave the console again, just press `Ctrl p` `Ctrl q`.\n\n#### Viewing background server logs\nAlternatively, you can use `docker logs container_name` to view the console output without getting stuck in the console.\n \n## Running phpstan (code analysis)\nYou can also choose to use a pre-built image from [dockerhub]() for running phpstan but if you are targetting a specific\ntag or fork of pocketmine you will need to build your own image following the [provided instructions](#coming-soon).\n\n### Quick start (phpstan)\n__You do NOT need to clone this repo to install the pocketmine phpstan code analysis image!__\n\nAlthough this is a quick start guide, you still need to know how to run commands on a Linux/MacOS machine and already\nhave Docker installed.\n\n(If you prefer a more technical reference, there is [in-depth documentation](phpstan/README.md) section available with\nthe full build instructions.)\n\n#### Required volume\nThe phpstan image uses a single volume for running analysis on your code, this is usually the directory where your `src`\nfolder and `plugin.yml` file are located. Make sure to create the directory or have your plugins source directory available\n(easiest if you `cd` to it/its your current working directory).\n\n#### Running the analysis\nNow you can run phpstan analysis with the following command:\n\n```\ndocker run -it -v $PWD:/source nxtlvlsoftware/pmmp-phpstan:stable\n```\n \nThis will run php stan with the [default configuration](phpstan/phpstan.neon) provided with image on the plugin in your\ncurrent working directory. If your plugin source is in another directory you can replace `$PWD` with the full/absolute path\nto your plugins source folder:\n\n```\ndocker run -it -v /home/dev/my-plugin:/source nxtlvlsoftware/pmmp-phpstan:stable\n```\n\n#### Resolving plugin dependencies\nIf your plugin lists dependencies in its plugin.yml (`depend`, `softdepend` or `loadbefore`) the container will try and\nfind the latest versions of each plugin listed on poggit and download them into `/deps` if found. The default phpstan\nconfiguration will automatically autoload all files under `/deps` so the analysis is aware of your plugins dependencies.\n\n#### Resolving composer dependencies\nIf a `composer.json` file is present in your plugins root directory (along side `plugin.yml`) the container will attempt\nto install the dependencies. The default phpstan configuration does not include the autoloader generated by the `composer install`\ncommand so you will need to provide your own config.\n\n#### Custom phpstan configuration\nIf the default phpstan configuration is not sufficient you can specify the path to your own `phpstan.neon` file as an\nenvironment variable if it exists in your plugins source folder:\n\n```\ndocker run -it -v $PWD:/source -e PHPSTAN_CONFIG=/source/phpstan.neon.dist nxtlvlsoftware/pmmp-phpstan:stable\n```\n\nGiven your plugins directory structure looks something like the following:\n```text\nmy-plugin\n  \u003e src\n  \u003e plugin.yml\n  \u003e phpstan.neon.dist\n```\n\nThis will tell php stan to look for the `phpstan.neon.dist` file provided by your `source` directory (this should be the\nroot directory that includes /src, /plugin.yml, etc). In the container your plugins root directory will be mounted under\n`/source` so you need to provide the path to your configuration file relative to the path you mount to `/source`.\n\n#### Autoloading pocketmine\nIf you provide your own phpstan configuration you will need to tell phpstan to autoload the pocketmine classes or the\nanalysis will fail. The easiest way to achieve this is by telling phpstan about the composer generated autoloader in the phar:\n\n```neon\nautoload_files:\n\t- phar:///pocketmine/PocketMine-MP.phar/vendor/autoload.php\n```\n\n#### Default configuration\nIf you run into issues configuring phpstan you may find it helpful to take a look at the [default configuration](phpstan/phpstan.neon)\nprovided.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxtlvlsoftware%2Fdocker-pmmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnxtlvlsoftware%2Fdocker-pmmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnxtlvlsoftware%2Fdocker-pmmp/lists"}