Giter Club home page Giter Club logo

multipaper-container's Introduction

GitHub tag (latest by date) GitHub Workflow Status GitHub Workflow Status

MultiPaper Container

MultiPaper Container will automatically publish the latest MulitPaper containers to Docker Hub.

What is MultiPaper

MultiPaper is a scalable minecraft server. Here is the repository. You can also download the MultiPaper Jar from MultiPaper.io

How to Use

Running MultiPaper Master

docker run -d -p 35353:35353 akiicat/multipaper-master

Running MultiPaper Server

If you want to the customize server name, you can add -DbungeecordName=server1 to JAVA_TOOL_OPTIONS. For more MultiPaper JAVA_TOOL_OPTIONS configuration, please refer to MULTIPAPER_YAML.md and MultiPaper command-line-options.

docker run -d \
        -p 25565:25565 \
        -e EULA=true \
        -e JAVA_TOOL_OPTIONS="-Xmx1G -DmultipaperMasterAddress=<your_ip_address>:35353" \
        akiicat/multipaper [server_options]

Please changing <your_ip_address> in the previous command to your master ip address. For example,

docker run -d \
        -p 25565:25565 \
        -e EULA=true \
        -e JAVA_TOOL_OPTIONS="-Xmx1G -DmultipaperMasterAddress=192.168.0.193:35353" \
        akiicat/multipaper --max-players 30

For MultiPaper server configurations, you can add them to the end of the command line.

Server Configurations

You can execute the following command to get the latest options.

docker run --rm akiicat/multipaper --help

For example,

$ docker run --rm akiicat/multipaper --help
Downloading mojang_1.18.2.jar
Applying patches
Starting org.bukkit.craftbukkit.Main
Option                                  Description
------                                  -----------
-?, --help                              Show the help
-C, --commands-settings <File: Yml      File for command settings (default:
  file>                                   commands.yml)
-P, --plugins <File: Plugin directory>  Plugin directory to use (default:
                                          plugins)
-S, --spigot-settings <File: Yml file>  File for spigot settings (default:
                                          spigot.yml)
-W, --universe, --world-container, --   World container (default: .)
  world-dir <File: Directory
  containing worlds>
--add-extra-plugin-jar, --add-plugin    Specify paths to extra plugin jars to
  <File: Jar file>                        be loaded in addition to those in
                                          the plugins folder. This argument
                                          can be specified multiple times,
                                          once for each extra plugin jar path.
--add-extra-plugin-jars, --add-plugin-  Specify paths of a directory
  dir, --add-plugin-directory <File:      containing extra plugin jars to be
  Plugin directory>                       loaded in addition to those in the
                                          plugins folder. This argument can be
                                          specified multiple times, once for
                                          each extra plugin directory path.
-b, --bukkit-settings <File: Yml file>  File for bukkit settings (default:
                                          bukkit.yml)
-c, --config <File: Properties file>    Properties file to use (default:
                                          server.properties)
-d, --date-format <SimpleDateFormat:    Format of the date to display in the
  Log date format>                        console (for log entries)
--demo                                  Demo mode
--eraseCache                            Whether to force cache erase during
                                          world upgrade
--forceUpgrade                          Whether to force a world upgrade
-h, --host, --server-ip <String:        Host to listen on
  Hostname or IP>
--log-append <Boolean: Log append>      Whether to append to the log file
                                          (default: true)
--log-count <Integer: Log count>        Specified how many log files to cycle
                                          through (default: 1)
--log-limit <Integer: Max log size>     Limits the maximum size of the log
                                          file (0 = unlimited) (default: 0)
--log-pattern <String: Log filename>    Specfies the log filename pattern
                                          (default: server.log)
--log-strip-color                       Strips color codes from log file
--multipaper, --multipaper-settings     File for multipaper settings (default:
  <File: Yml file>                        multipaper.yml)
--noconsole                             Disables the console
--nogui                                 Disables the graphical console
--nojline                               Disables jline and emulates the
                                          vanilla console
-o, --online-mode <Boolean:             Whether to use online authentication
  Authentication>
-p, --port, --server-port <Integer:     Port to listen on
  Port>
--paper, --paper-settings <File: Yml    File for paper settings (default:
  file>                                   paper.yml)
-s, --max-players, --size <Integer:     Maximum amount of players
  Server size>
--server-name <String: Name>            Name of the server (default: Unknown
                                          Server)
-v, --version                           Show the CraftBukkit Version
-w, --level-name, --world <String:      World name
  World name>

Advanced Usage

Here are some useful Docker run command options. Because both the server and the master are the same, we use the Multipaper Master as an example.

Docker options
-d   : Detached mode: Run container in the background, print new container id
-t   : Allocate a pseudo-tty
-i   : Keep STDIN open even if not attached
--rm : Automatically clean up the container and remove the file system when the container exits
-p   : Publish or expose port <local_port>:<container_port>
-v   : Persisting your data <local_path>:<container_path>
-u   : Change user id (UID)

Run in foreground and clean up the container when it exits.

docker run -ti --rm -p 35353:35353 akiicat/multipaper-master

Use the existing world or save your world in the local directory. Your path must be an absolute path.

mkdir -p $(pwd)/master
docker run -d -p 35353:35353 -v $(pwd)/master:/app akiicat/multipaper-master

The default user is multipaper with uid 1000. You can also run as root, but this is not recommended.

docker run -d -p 35353:35353 -u 0 akiicat/multipaper-master

Limit maximum memory

docker run -d \
        -p 35353:35353 \
        -e JAVA_TOOL_OPTIONS="-Xmx1G" \
        akiicat/multipaper-master

Other Java configurations can also be added to JAVA_TOOL_OPTIONS.

You can obtain the latest version of the MultiPaper Container by requesting the following command.

SERVER_VERSION=$(curl https://raw.githubusercontent.com/akiicat/MultiPaper-Container/main/server/tags)
MASTER_VERSION=$(curl https://raw.githubusercontent.com/akiicat/MultiPaper-Container/main/master/tags)
echo $SERVER_VERSION
echo $MASTER_VERSION

Build from source

git clone https://github.com/akiicat/MultiPaper-Container.git

# change version
# git checkout <tags>
git checkout v1.18.2-60

# build
docker build -t multipaper server
docker build -t multipaper-master master

# list images
docker images | grep multipaper

Debugging

List all logs

docker logs <container_name_or_container_id>
docker logs <container_name_or_container_id> -f     # Follow log output

Run a shell in a new container

docker run -ti --rm--entrypoint /bin/sh akiicat/multipaper

Run a shell to an existing container

docker exec -ti <container_name_or_container_id> /bin/sh

Container detail infomation

docker inspect <container_name_or_container_id>

License

  • MultiPaper is licensed under GPLv3
  • MultiPaper-Master is licensed under MIT

multipaper-container's People

Contributors

akiicat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

multipaper-container's Issues

Alpine OpenJDK 17 EA version

The current base image used for either the master or the server contains the OpenJDK 17 Alpine image. This image is based off an EA version of JDK 17.

Because this version is not supported at all and since Paper does not supporting the EA version of Java 17 (PaperMC/Paper#7062), which causes the server to crash whenever a vine grows, this base image should be avoided.

Please update to a maintained downstream Docker image of JDK 17.

Server Configuration not working

docker run -d \
        -p 25565:25565 \
        -e EULA=true \
        -e JAVA_TOOL_OPTIONS="-Xmx1G -DmultipaperMasterAddress=<your_ip_address>:35353" \
        akiicat/multipaper --max-players 30

The maximum player should be 30 instead of 20.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.