mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
58 Commits
2021.19.0
...
2021.20.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0122b74815 | ||
|
|
1f2f33d6c0 | ||
|
|
1a3c454d7f | ||
|
|
fa11d313fb | ||
|
|
20bc2a97d9 | ||
|
|
1b4f26d2e8 | ||
|
|
0cd49c4c81 | ||
|
|
6c1cd2537d | ||
|
|
cf31f24752 | ||
|
|
27523a1c45 | ||
|
|
e1d0fe6b92 | ||
|
|
d3f4a4991e | ||
|
|
296ddbdec5 | ||
|
|
f7cd34b8d8 | ||
|
|
7bafffbd06 | ||
|
|
201ec3be5a | ||
|
|
7d1d5af097 | ||
|
|
f9ce5bce4d | ||
|
|
748768c771 | ||
|
|
f307077636 | ||
|
|
5bf6013d6b | ||
|
|
428a7c1875 | ||
|
|
3ba8889194 | ||
|
|
c144da4485 | ||
|
|
2a1f5b7500 | ||
|
|
1725a6ed14 | ||
|
|
8ab55e1ef3 | ||
|
|
32a5ab5138 | ||
|
|
fb97af317e | ||
|
|
fe758aab61 | ||
|
|
4c2868f6c9 | ||
|
|
919aff0080 | ||
|
|
8504cf7caf | ||
|
|
101a7486f2 | ||
|
|
80e576db2d | ||
|
|
3a73e47b83 | ||
|
|
62824051c8 | ||
|
|
c4a2403943 | ||
|
|
2aad0a9407 | ||
|
|
6ead8c3cf0 | ||
|
|
3a18a19583 | ||
|
|
f620b09134 | ||
|
|
2838251c67 | ||
|
|
f7cff34527 | ||
|
|
acdf8c35fa | ||
|
|
c5f2bf1059 | ||
|
|
1f25fae04f | ||
|
|
caffa2fd8d | ||
|
|
8de8eb3104 | ||
|
|
2d3fa3c09e | ||
|
|
f7b3c77f78 | ||
|
|
d968048ef5 | ||
|
|
6d26ca04be | ||
|
|
577eef3631 | ||
|
|
21d7fb476b | ||
|
|
4c3a329e31 | ||
|
|
6c94e49732 | ||
|
|
af77b29509 |
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
custom:
|
||||
- https://www.buymeacoffee.com/itzg
|
||||
- https://paypal.me/itzg
|
||||
2
.github/workflows/build-multiarch.yml
vendored
2
.github/workflows/build-multiarch.yml
vendored
@@ -66,7 +66,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
# ensure latest base image is used
|
||||
|
||||
2
.github/workflows/generate-toc.yml
vendored
2
.github/workflows/generate-toc.yml
vendored
@@ -16,6 +16,6 @@ jobs:
|
||||
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
|
||||
chmod a+x gh-md-toc
|
||||
./gh-md-toc --insert --no-backup README.md
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.11.0
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.12.0
|
||||
with:
|
||||
commit_message: "docs: Auto update markdown TOC"
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM adoptopenjdk:16-jre
|
||||
FROM adoptopenjdk:11-jre-openj9
|
||||
|
||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||
|
||||
@@ -9,6 +9,7 @@ RUN apt-get update \
|
||||
gosu \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
curl wget \
|
||||
git \
|
||||
jq \
|
||||
@@ -59,6 +60,10 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG ASCIIFY_VERSION=1.0.1
|
||||
ADD https://jitpack.io/com/github/itzg/asciify/${ASCIIFY_VERSION}/asciify-${ASCIIFY_VERSION}.jar /usr/share/asciify/asciify.jar
|
||||
RUN chmod -R a+r /usr/share/asciify
|
||||
|
||||
COPY mcstatus /usr/local/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
31
README.md
31
README.md
@@ -117,19 +117,20 @@ By default, the container will download the latest version of the "vanilla" [Min
|
||||
* [Server Shutdown Options](#server-shutdown-options)
|
||||
* [OpenJ9 Specific Options](#openj9-specific-options)
|
||||
* [Enabling rolling logs](#enabling-rolling-logs)
|
||||
* [Timezone Configuration](#timezone-configuration)
|
||||
* [Timezone Configuration](#timezone-configuration)
|
||||
* [Enable Remote JMX for Profiling](#enable-remote-jmx-for-profiling)
|
||||
* [Enable Aikar's Flags](#enable-aikars-flags)
|
||||
* [HTTP Proxy](#http-proxy)
|
||||
* [Using "noconsole" option](#using-noconsole-option)
|
||||
* [Explicitly disable GUI](#explicitly-disable-gui)
|
||||
* [Stop Duration](#stop-duration)
|
||||
* [Setup only](#setup-only)
|
||||
* [Autopause](#autopause)
|
||||
* [Description](#description)
|
||||
* [Enabling Autopause](#enabling-autopause)
|
||||
* [Running on RaspberryPi](#running-on-raspberrypi)
|
||||
|
||||
<!-- Added by: runner, at: Sun Aug 29 21:26:46 UTC 2021 -->
|
||||
<!-- Added by: runner, at: Thu Sep 16 01:45:44 UTC 2021 -->
|
||||
|
||||
<!--te-->
|
||||
|
||||
@@ -271,9 +272,9 @@ To use a different version of Java, please use a docker tag to run your Minecraf
|
||||
| java16-openj9 | 16 | Debian | OpenJ9 | amd64 |
|
||||
| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
|
||||
For example, to use Java version 15 on any supported architecture:
|
||||
For example, to use Java version 16 on any supported architecture:
|
||||
|
||||
docker run --name mc itzg/minecraft-server:java15
|
||||
docker run --name mc itzg/minecraft-server:java16
|
||||
|
||||
> Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation.
|
||||
|
||||
@@ -745,6 +746,10 @@ read-only volume attachment to ensure the clone source remains pristine.
|
||||
docker run ... -v $HOME/worlds:/worlds:ro -e WORLD=/worlds/basic
|
||||
```
|
||||
|
||||
The following diagram shows how this option can be used in a compose deployment with a relative directory:
|
||||
|
||||

|
||||
|
||||
### Overwrite world on start
|
||||
The world will only be downloaded or copied if it doesn't exist already. Set `FORCE_WORLD_COPY=TRUE` to force overwrite the world on every server start.
|
||||
|
||||
@@ -823,7 +828,7 @@ The server icon which has been set doesn't get overridden by default. It can be
|
||||
|
||||
### Rcon
|
||||
|
||||
To use rcon use the `ENABLE_RCON` and `RCON_PASSORD` variables.
|
||||
To use rcon use the `ENABLE_RCON` and `RCON_PASSWORD` variables.
|
||||
By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable.
|
||||
|
||||
docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing
|
||||
@@ -968,7 +973,7 @@ For example:
|
||||
|
||||
### Message of the Day
|
||||
|
||||
The message of the day, shown below each server entry in the UI, can be changed with the `MOTD` environment variable, such as
|
||||
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as
|
||||
|
||||
-e MOTD="My Server"
|
||||
|
||||
@@ -978,6 +983,14 @@ If you leave it off, a default is computed from the server type and version, suc
|
||||
|
||||
That way you can easily differentiate between several servers you may have started.
|
||||
|
||||
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.fandom.com/wiki/Formatting_codes) to be used consistently with all server versions. For example,
|
||||
|
||||
-e MOTD="A §l§cMinecraft§r §nserver"
|
||||
|
||||
renders
|
||||
|
||||

|
||||
|
||||
### PVP Mode
|
||||
|
||||
By default, servers are created with player-vs-player (PVP) mode enabled. You can disable this with the `PVP`
|
||||
@@ -1264,7 +1277,7 @@ By default the vanilla log file will grow without limit. The logger can be recon
|
||||
|
||||
> **NOTE** this will interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
|
||||
|
||||
## Timezone Configuration
|
||||
### Timezone Configuration
|
||||
|
||||
You can configure the timezone to match yours by setting the `TZ` environment variable:
|
||||
|
||||
@@ -1323,6 +1336,10 @@ disable that by passing `-e GUI=FALSE`.
|
||||
|
||||
When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds.
|
||||
|
||||
### Setup only
|
||||
|
||||
If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`.
|
||||
|
||||
## Autopause
|
||||
|
||||
### Description
|
||||
|
||||
BIN
docs/motd-example.png
Normal file
BIN
docs/motd-example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 985 B |
27
examples/docker-compose-rlcraft.yml
Normal file
27
examples/docker-compose-rlcraft.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
rlcraft:
|
||||
image: itzg/minecraft-server:java8
|
||||
container_name: rlcraft
|
||||
volumes:
|
||||
- rlcraft-modpack:/modpacks:ro
|
||||
- rlcraft-data:/data
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.12.2"
|
||||
FORGEVERSION: "14.23.5.2855"
|
||||
DIFFICULTY: "hard"
|
||||
MAX_TICK_TIME: "-1"
|
||||
VIEW_DISTANCE: "6"
|
||||
ALLOW_FLIGHT: "true"
|
||||
MEMORY: "4G"
|
||||
GENERIC_PACK: "/modpacks/RLCraft_Server_Pack_1.12.2_Beta_v2.8.2.zip"
|
||||
ports:
|
||||
- 25565:25565
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
rlcraft-data:
|
||||
rlcraft-modpack:
|
||||
@@ -98,14 +98,12 @@ case "${TYPE^^}" in
|
||||
;;
|
||||
|
||||
FORGE)
|
||||
if versionLessThan 1.17; then
|
||||
log "**********************************************************************"
|
||||
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||
log " since some mods require Java 8"
|
||||
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||
log " can be fixed with java8"
|
||||
log "**********************************************************************"
|
||||
fi
|
||||
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||
;;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ function customizeServerProps {
|
||||
setServerProp "server-name" "$SERVER_NAME"
|
||||
setServerProp "server-ip" "$SERVER_IP"
|
||||
setServerProp "server-port" "$SERVER_PORT"
|
||||
setServerProp "motd" "$MOTD"
|
||||
setServerProp "motd" "$(echo $MOTD | java -jar /usr/share/asciify/asciify.jar)"
|
||||
setServerProp "allow-nether" "$ALLOW_NETHER"
|
||||
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
|
||||
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
|
||||
|
||||
Reference in New Issue
Block a user