Sign inSign up

sharpscontainer/fabric-mc

By sharpscontainer

Updated 5 days ago

An Alpine Linux Fabric MC server that comes with Lithium and Servinator preinstalled.

Image
0

10K+

sharpscontainer/fabric-mc repository overview

Fabric MC

Source code

Runs a simple Alpine Linux-based Fabric server for Minecraft with AWS costs in mind. Comes preinstalled with the following:

  • Lithium (mod): improves performance of the game
  • Servinator (datapack): a custom-made datapack that shuts the server down if no players are connected.

How to run

To run with an interactive shell, which gives you the ability to run commands from the server console:

docker run --name fabric  -ti -p 0.0.0.0:25565:25565 sharpscontainer/fabric-mc:latest

Alternatively, you can run the container in a detached state and use docker attach later to access the server console.

docker run --name fabricmc -d -p 0.0.0.0:25565:25565 sharpscontainer/fabric-mc:latest
docker attach fabricmc

Data persistence

Server data is stored in the container at /home/fabric. To save this data, you can simply mount a volume on the container:

docker run --name fabricmc -d -p 0.0.0.0:25565:25565 -v server:/home/fabric sharpscontainer/fabric-mc:latest

Other

It's worth specifying the amount of memory the server should use. The JAVA_TOOL_OPTIONS environment variable can be used to do this. For example, to run the server with 4GB of memory:

docker run --name fabricmc -d -p 0.0.0.0:25565:25565 -e "JAVA_TOOL_OPTIONS=-Xms4096M -Xmx4096M" sharpscontainer/fabric-mc:latest

Tag summary

Content type

Image

Digest

sha256:679fe7efd

Size

177.6 MB

Last updated

5 days ago

docker pull sharpscontainer/fabric-mc