Automatically publish the latest MultiPaper containers to Docker Hub.
at main 241 lines 9.7 kB view raw view rendered
1![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/akiicat/MultiPaper-Container?label=Version) 2[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/akiicat/MultiPaper-Container/publish-docker-image.yaml?label=Publish%20Docker%20Image)](https://github.com/akiicat/MultiPaper-Container/actions/workflows/publish-docker-image.yaml) 3[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/akiicat/MultiPaper-Container/auto-check-latest-version.yaml?label=Auto%20Check%20Latest%20Version)](https://github.com/akiicat/MultiPaper-Container/actions/workflows/auto-check-latest-version.yaml) 4[![MultiPaper Server Docker Image Version](https://img.shields.io/docker/v/akiicat/multipaper?label=MultiPaper%20Server%20Image)](https://hub.docker.com/r/akiicat/multipaper) 5[![MultiPaper Master Docker Image Version](https://img.shields.io/docker/v/akiicat/multipaper-master?label=MultiPaper%20Master%20Image)](https://hub.docker.com/r/akiicat/multipaper-master) 6 7# MultiPaper Container 8 9MultiPaper Container will automatically publish the latest MulitPaper containers to Docker Hub. 10 11- [MultiPaper Server Image](https://hub.docker.com/r/akiicat/multipaper) 12- [MultiPaper Master Image](https://hub.docker.com/r/akiicat/multipaper-master) 13 14## What is MultiPaper 15 16MultiPaper is a scalable minecraft server. [Here](https://github.com/PureGero/MultiPaper) is the repository. You can also download the MultiPaper Jar from [MultiPaper.io](https://multipaper.io/download.html) 17 18## How to Use 19 20### Running MultiPaper Master 21 22```shell 23docker run -d -p 35353:35353 akiicat/multipaper-master 24``` 25 26### Running MultiPaper Server 27 28If you want to the customize server name, you can add `-DbungeecordName=server1` to `JAVA_TOOL_OPTIONS`. 29For more MultiPaper `JAVA_TOOL_OPTIONS` configuration, please refer to [MULTIPAPER_YAML.md](https://github.com/PureGero/MultiPaper/blob/main/MULTIPAPER_YAML.md) and [MultiPaper command-line-options](https://github.com/PureGero/MultiPaper#command-line-options). 30 31```shell 32docker run -d \ 33 -p 25565:25565 \ 34 -e EULA=true \ 35 -e JAVA_TOOL_OPTIONS="-Xmx1G -DmultipaperMasterAddress=<your_ip_address>:35353" \ 36 akiicat/multipaper [server_options] 37``` 38 39Please changing `<your_ip_address>` in the previous command to your master ip address. For example, 40 41```shell 42docker run -d \ 43 -p 25565:25565 \ 44 -e EULA=true \ 45 -e JAVA_TOOL_OPTIONS="-Xmx1G -DmultipaperMasterAddress=192.168.0.193:35353" \ 46 akiicat/multipaper --max-players 30 47``` 48 49For MultiPaper server configurations, you can add them to the end of the command line. 50 51<details> 52 <summary>Server Configurations</summary> 53 54You can execute the following command to get the latest options. 55 56```shell 57docker run --rm akiicat/multipaper --help 58``` 59 60For example, 61 62```shell 63$ docker run --rm akiicat/multipaper --help 64Downloading mojang_1.18.2.jar 65Applying patches 66Starting org.bukkit.craftbukkit.Main 67Option Description 68------ ----------- 69-?, --help Show the help 70-C, --commands-settings <File: Yml File for command settings (default: 71 file> commands.yml) 72-P, --plugins <File: Plugin directory> Plugin directory to use (default: 73 plugins) 74-S, --spigot-settings <File: Yml file> File for spigot settings (default: 75 spigot.yml) 76-W, --universe, --world-container, -- World container (default: .) 77 world-dir <File: Directory 78 containing worlds> 79--add-extra-plugin-jar, --add-plugin Specify paths to extra plugin jars to 80 <File: Jar file> be loaded in addition to those in 81 the plugins folder. This argument 82 can be specified multiple times, 83 once for each extra plugin jar path. 84--add-extra-plugin-jars, --add-plugin- Specify paths of a directory 85 dir, --add-plugin-directory <File: containing extra plugin jars to be 86 Plugin directory> loaded in addition to those in the 87 plugins folder. This argument can be 88 specified multiple times, once for 89 each extra plugin directory path. 90-b, --bukkit-settings <File: Yml file> File for bukkit settings (default: 91 bukkit.yml) 92-c, --config <File: Properties file> Properties file to use (default: 93 server.properties) 94-d, --date-format <SimpleDateFormat: Format of the date to display in the 95 Log date format> console (for log entries) 96--demo Demo mode 97--eraseCache Whether to force cache erase during 98 world upgrade 99--forceUpgrade Whether to force a world upgrade 100-h, --host, --server-ip <String: Host to listen on 101 Hostname or IP> 102--log-append <Boolean: Log append> Whether to append to the log file 103 (default: true) 104--log-count <Integer: Log count> Specified how many log files to cycle 105 through (default: 1) 106--log-limit <Integer: Max log size> Limits the maximum size of the log 107 file (0 = unlimited) (default: 0) 108--log-pattern <String: Log filename> Specfies the log filename pattern 109 (default: server.log) 110--log-strip-color Strips color codes from log file 111--multipaper, --multipaper-settings File for multipaper settings (default: 112 <File: Yml file> multipaper.yml) 113--noconsole Disables the console 114--nogui Disables the graphical console 115--nojline Disables jline and emulates the 116 vanilla console 117-o, --online-mode <Boolean: Whether to use online authentication 118 Authentication> 119-p, --port, --server-port <Integer: Port to listen on 120 Port> 121--paper, --paper-settings <File: Yml File for paper settings (default: 122 file> paper.yml) 123-s, --max-players, --size <Integer: Maximum amount of players 124 Server size> 125--server-name <String: Name> Name of the server (default: Unknown 126 Server) 127-v, --version Show the CraftBukkit Version 128-w, --level-name, --world <String: World name 129 World name> 130``` 131 132</details> 133 134## Advanced Usage 135 136Here are some useful Docker `run` command [options](https://docs.docker.com/engine/reference/run). 137Because both the server and the master are the same, we use the Multipaper Master as an example. 138 139<details> 140 <summary>Docker options</summary> 141 142``` 143-d : Detached mode: Run container in the background, print new container id 144-t : Allocate a pseudo-tty 145-i : Keep STDIN open even if not attached 146--rm : Automatically clean up the container and remove the file system when the container exits 147-p : Publish or expose port <local_port>:<container_port> 148-v : Persisting your data <local_path>:<container_path> 149-u : Change user id (UID) 150``` 151 152</details> 153 154Run in foreground and clean up the container when it exits. 155 156```shell 157docker run -ti --rm -p 35353:35353 akiicat/multipaper-master 158``` 159 160Use the existing world or save your world in the local directory. Your path must be an absolute path. 161 162```shell 163mkdir -p $(pwd)/master 164docker run -d -p 35353:35353 -v $(pwd)/master:/app akiicat/multipaper-master 165``` 166 167The default user is **multipaper** with uid 1000. You can also run as root, but this is not recommended. 168 169```shell 170docker run -d -p 35353:35353 -u 0 akiicat/multipaper-master 171``` 172 173Limit maximum memory 174 175```shell 176docker run -d \ 177 -p 35353:35353 \ 178 -e JAVA_TOOL_OPTIONS="-Xmx1G" \ 179 akiicat/multipaper-master 180``` 181 182Other Java configurations can also be added to `JAVA_TOOL_OPTIONS`. 183 184You can obtain the latest version of the MultiPaper Container by requesting the following command. 185 186```shell 187SERVER_VERSION=$(curl https://raw.githubusercontent.com/akiicat/MultiPaper-Container/main/server/tags) 188MASTER_VERSION=$(curl https://raw.githubusercontent.com/akiicat/MultiPaper-Container/main/master/tags) 189echo $SERVER_VERSION 190echo $MASTER_VERSION 191``` 192 193## Build from source 194 195```shell 196git clone https://github.com/akiicat/MultiPaper-Container.git 197 198# change version 199# git checkout <tags> 200git checkout v1.18.2-60 201 202# build 203docker build -t multipaper server 204docker build -t multipaper-master master 205 206# list images 207docker images | grep multipaper 208``` 209 210## Debugging 211 212List all logs 213 214```shell 215docker logs <container_name_or_container_id> 216docker logs <container_name_or_container_id> -f # Follow log output 217``` 218 219Run a shell in a new container 220 221```shell 222docker run -ti --rm--entrypoint /bin/sh akiicat/multipaper 223``` 224 225Run a shell to an existing container 226 227```shell 228docker exec -ti <container_name_or_container_id> /bin/sh 229``` 230 231Container detail infomation 232 233```shell 234docker inspect <container_name_or_container_id> 235``` 236 237## License 238 239- MultiPaper is licensed under [GPLv3](https://github.com/PureGero/MultiPaper/blob/main/LICENSE.txt) 240- MultiPaper-Master is licensed under [MIT](https://github.com/PureGero/MultiPaper/blob/main/MultiPaper-Master/LICENSE.txt) 241