Docker Companion

Quick rating

Docker Companion

No reviews yet

Server and Docker are best friends now!

Mod Loaders
NeoForge
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Unsupported
Server Required

About

Project Details

Type
Mod
License
MIT License
Latest Version
1.1.1
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

This mod makes dedicated server more friendly for docker usecases, allowing easily create isolated server setup within seconds without using bloated third-party images and pieces of software.

It can:

  • apply server properties from SERVER_PROPERTIES env varibale
  • auto-op players from SERVER_OPERATORS env varibale
  • handles process signals correctly and gracefully shut-down server process
example Dockerfile

Note, entrypoint must exec java binary in order to handle signals properly and have nice graceful shutdown.

FROM eclipse-temurin:25-jre-alpine-3.23 AS server-build
RUN mkdir /server && apk update && apk add wget
WORKDIR /server
RUN wget -O /installer.jar https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.217/neoforge-21.1.217-installer.jar
RUN java -jar /installer.jar --installServer
RUN echo "eula=true" > eula.txt

FROM eclipse-temurin:25-jre-alpine-3.23
COPY --from=server-build /server /server

RUN cat <<'EOF' > /server/entrypoint.sh
#/usr/bin/env sh
set -e

USER_ID=${USER_ID:-1000}
GROUP_ID=${GROUP_ID:-1000}
USERNAME=${USERNAME:-appuser}

if ! getent group "$GROUP_ID" >/dev/null 2>&1; then
    addgroup -g "$GROUP_ID" "$USERNAME"
fi

if ! id -u "$USER_ID" >/dev/null 2>&1; then
    adduser -D -u "$USER_ID" -G "$USERNAME" -s /bin/bash "$USERNAME"
fi

echo "$SERVER_JAVA_OPTS" > user_jvm_args.txt
chown -R "$USER_ID":"$GROUP_ID" .
exec su-exec "$USERNAME" sh -c 'exec java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.217/unix_args.txt'
EOF

RUN chmod +x /server/entrypoint.sh
RUN apk add --no-cache su-exec
WORKDIR /server
CMD ["/server/entrypoint.sh"]
example docker-compose.yml
services:
  minecraft-server:
    build: ./container
    container_name: minecraft-server
    stdin_open: true
    tty: true
    ports:
      - "25565:25565"
    volumes:
      - ./data/mods:/server/mods
      - ./data/world:/server/world
    environment:
      SERVER_JAVA_OPTS: |2
        -Xms2G
        -Xmx10G
        -XX:+UseZGC
        -XX:+ZGenerational 
        -XX:+AlwaysPreTouch 
        -XX:+UseStringDeduplication
      SERVER_OPERATORS: |2
        op-player-uuid
        another-op-player-uuid
      SERVER_PROPERTIES: |2
        max-players=20
        motd=Welcome to the Minecraft Server!
        online-mode=false
        difficulty=normal
        gamemode=survival
        spawn-monsters=true
        view-distance=10
        white-list=false
        pvp=true
        generate-structures=true
        max-world-size=29999984
        enable-query=false
        enable-rcon=false
        enable-status=false
    restart: unless-stopped

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Modrinth
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works