A lightweight, high-performance Docker image for running a Fabric Minecraft server. It is built on top of Azul Zulu OpenJDK (Alpine Linux) to ensure minimal footprint and maximum performance.
This project provides a production-ready Docker image for hosting a Fabric Minecraft Server. It handles the installation of the specific Fabric Loader and Installer versions defined in the repository, ensuring reproducibility.
Unlike other images that download the latest version on every startup, this image uses a Pinned Version Strategy:
- An automated workflow checks daily for new Fabric updates.
- If an update is found, it validates it and creates a Pull Request to this repository.
- Upon merging, a new Docker image is built with those exact versions baked in.
- Your server downloads this immutable image, ensuring that
latestassumes a tested and specific version, preventing random breaks on restart.
- Performance: Usign Alpine Linux + Zulu OpenJDK provides a very slim and fast Java environment.
- Stability: By pinning versions in the image build process (instead of a startup script), we guarantee that the server environment is identical across restarts until you explicitly decide to update the image.
- Simplicity: No complex startup flags to configure versions; just pull and run.
This is the easiest way to manage your server.
-
Create a
docker-compose.ymlfile:services: minecraft: image: ghcr.io/alvarosdev/zulu-fabricmc:latest container_name: fabricserver restart: unless-stopped ports: - "25565:25565" volumes: - ./minecraft_data:/data environment: - MEMORYSIZE=4G - TZ=America/Santiago
-
Start the server:
docker-compose up -d
If you prefer running a single command:
docker run -d \
--name fabricserver \
-p 25565:25565 \
-v $(pwd)/minecraft_data:/data \
-e MEMORYSIZE=4G \
ghcr.io/alvarosdev/zulu-fabricmc:latestAll your server data (world, mods, configs) is stored in the mounted volume (e.g., ./minecraft_data).
To install mods:
- Download the
.jarfiles for your mods (matching the Minecraft version). - Place them in the
minecraft_data/modsfolder. - Restart the server.
This project includes a Makefile to simplify common operations. You can use it if you have make installed (Linux/macOS/WSL).
| Command | Description |
|---|---|
make up |
Starts the server in background (docker-compose up -d). |
make stop |
Stops the server gracefully (docker-compose stop). |
make down |
Stops and removes containers and networks (keeps volumes). |
make restart |
Restarts the container (useful after adding mods). |
make logs |
Follows the last 50 lines of logs. |
make attach |
Attaches to the server console. Use Ctrl+P, Ctrl+Q to detach! Ctrl+C will kill the server. |
make update |
Pulls the latest image and restarts the server (replaces make update-container). |
make build |
Rebuilds the image locally using the Dockerfile with zero cache. |
make clean |
WARNING: Stops server and deletes ALL data (including world/mods). |
Example:
make logs