mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-22 09:06:23 +00:00
Compare commits
16 Commits
2021.2.0-m
...
2021.3.0-j
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ceee9eddc9 | ||
|
|
60ba668743 | ||
|
|
beeaf1a996 | ||
|
|
fd1b15e01f | ||
|
|
f856276d71 | ||
|
|
0300854c46 | ||
|
|
96aa1054dc | ||
|
|
e7937206af | ||
|
|
081b2c11e4 | ||
|
|
f342f4aa98 | ||
|
|
f06e9f5ede | ||
|
|
4e73e69342 | ||
|
|
c6ff80b71c | ||
|
|
37cad3f255 | ||
|
|
5700f36a6f | ||
|
|
34f800d815 |
3
.github/workflows/build-multiarch.yml
vendored
3
.github/workflows/build-multiarch.yml
vendored
@@ -3,11 +3,14 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- multiarch
|
- multiarch
|
||||||
|
- java8-multiarch
|
||||||
- multiarch-latest
|
- multiarch-latest
|
||||||
|
- java15
|
||||||
- test/multiarch/*
|
- test/multiarch/*
|
||||||
tags:
|
tags:
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch"
|
- "[0-9]+.[0-9]+.[0-9]+-multiarch"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch-latest"
|
- "[0-9]+.[0-9]+.[0-9]+-multiarch-latest"
|
||||||
|
- "[0-9]+.[0-9]+.[0-9]+-java15"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-buildx:
|
docker-buildx:
|
||||||
|
|||||||
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
@@ -4,23 +4,18 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- java8
|
||||||
- openj9
|
- openj9
|
||||||
- openj9-11
|
- openj9-11
|
||||||
- openj9-nightly
|
|
||||||
- adopt11
|
- adopt11
|
||||||
- adopt13
|
|
||||||
- adopt14
|
|
||||||
- adopt15
|
|
||||||
- test/*
|
- test/*
|
||||||
tags:
|
tags:
|
||||||
- "[0-9]+.[0-9]+.[0-9]+"
|
- "[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
- "[0-9]+.[0-9]+.[0-9]+-java8"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-11"
|
- "[0-9]+.[0-9]+.[0-9]+-openj9-11"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-adopt13"
|
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-adopt14"
|
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-adopt15"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
58
README.md
58
README.md
@@ -160,24 +160,31 @@ the server jar remain in the `/data` directory. It is safe to remove those._
|
|||||||
|
|
||||||
To use a different version of Java, please use a docker tag to run your Minecraft server.
|
To use a different version of Java, please use a docker tag to run your Minecraft server.
|
||||||
|
|
||||||
| Tag name | Description | Linux |
|
| Tag name | Java version | Linux | JVM Type | Architecture |
|
||||||
| -------------- | ------------------------------------------- | ------------ |
|
| -------------- | -------------|--------|----------|-------------------|
|
||||||
| latest | **Default**. Uses Java version 8 | Alpine Linux |
|
| latest | 11 | Alpine | Hotspot | amd64 |
|
||||||
| adopt15 | Uses Java version 15 from AdoptOpenJDK | Alpine Linux |
|
| java8 | 8 | Alpine | Hotspot | amd64 |
|
||||||
| adopt14 | Uses Java version 14 from AdoptOpenJDK | Alpine Linux |
|
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
| adopt13 | Uses Java version 13 from AdoptOpenJDK | Alpine Linux |
|
| java15 | 15 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
| adopt11 | Uses Java version 11 from AdoptOpenJDK | Alpine Linux |
|
| adopt11 | 11 | Alpine | Hotspot | amd64 |
|
||||||
| openj9 | Uses Eclipse OpenJ9 JVM | Alpine Linux |
|
| openj9 | 8 | Alpine | OpenJ9 | amd64 |
|
||||||
| openj9-11 | Uses Eclipse OpenJ9 JVM for Java 11 | Alpine Linux |
|
| openj9-11 | 11 | Alpine | OpenJ9 | amd64 |
|
||||||
| openj9-nightly | Uses Eclipse OpenJ9 JVM testing builds | Alpine Linux |
|
| multiarch | 11 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
| multiarch | Uses Java version 8 latest update | Debian Linux |
|
| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
| multiarch-latest | Uses Java version 15 latest update | Debian Linux |
|
|
||||||
|
|
||||||
For example, to use a Java version 13:
|
For example, to use Java version 15 on any supported architecture:
|
||||||
|
|
||||||
docker run --name mc itzg/minecraft-server:adopt13
|
docker run --name mc itzg/minecraft-server:java15
|
||||||
|
|
||||||
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.
|
> 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.
|
||||||
|
|
||||||
|
### Deprecated Image Tags
|
||||||
|
|
||||||
|
The following image tags have been deprecated and are no longer receiving updates:
|
||||||
|
- adopt13
|
||||||
|
- adopt14
|
||||||
|
- adopt15
|
||||||
|
- openj9-nightly
|
||||||
|
|
||||||
## Healthcheck
|
## Healthcheck
|
||||||
|
|
||||||
@@ -508,7 +515,7 @@ A [Catserver](http://catserver.moe/) type server can be used with
|
|||||||
|
|
||||||
## Running a server with a Feed the Beast modpack
|
## Running a server with a Feed the Beast modpack
|
||||||
|
|
||||||
> **NOTE** requires `itzg/minecraft-server:multiarch` image
|
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
||||||
|
|
||||||
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by using `-e TYPE=FTBA` (**note** the "A" at the end of the type). This server type will automatically take care of downloading and installing the modpack and appropriate version of Forge, so the `VERSION` does not need to be specified.
|
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by using `-e TYPE=FTBA` (**note** the "A" at the end of the type). This server type will automatically take care of downloading and installing the modpack and appropriate version of Forge, so the `VERSION` does not need to be specified.
|
||||||
|
|
||||||
@@ -958,7 +965,7 @@ environment variable set to `false`, such as
|
|||||||
### Level Type and Generator Settings
|
### Level Type and Generator Settings
|
||||||
|
|
||||||
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
|
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
|
||||||
be configured by setting `LEVEL_TYPE` to an expected type, such as
|
be configured by setting `LEVEL_TYPE` to an expected type, for example
|
||||||
|
|
||||||
- DEFAULT
|
- DEFAULT
|
||||||
- FLAT
|
- FLAT
|
||||||
@@ -966,6 +973,8 @@ be configured by setting `LEVEL_TYPE` to an expected type, such as
|
|||||||
- AMPLIFIED
|
- AMPLIFIED
|
||||||
- CUSTOMIZED
|
- CUSTOMIZED
|
||||||
- BUFFET
|
- BUFFET
|
||||||
|
- BIOMESOP (Biomes O' Plenty for 1.12 and older)
|
||||||
|
- BIOMESOPLENTY (Biomes O' Plenty for 1.15 and above)
|
||||||
|
|
||||||
Descriptions are available at the [gamepedia](http://minecraft.gamepedia.com/Server.properties).
|
Descriptions are available at the [gamepedia](http://minecraft.gamepedia.com/Server.properties).
|
||||||
|
|
||||||
@@ -1096,19 +1105,18 @@ is passed to `docker run`.
|
|||||||
|
|
||||||
### Memory Limit
|
### Memory Limit
|
||||||
|
|
||||||
By default, the image declares a Java initial and maximum memory limit of 1 GB. There are several
|
By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings:
|
||||||
ways to adjust the memory settings:
|
|
||||||
|
|
||||||
- `MEMORY`, "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`)
|
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
|
||||||
memory settings of the JVM
|
- `INIT_MEMORY`: independently sets the initial heap size
|
||||||
- `INIT_MEMORY`, independently sets the initial heap size
|
- `MAX_MEMORY`: independently sets the max heap size
|
||||||
- `MAX_MEMORY`, independently sets the max heap size
|
|
||||||
|
|
||||||
The values of all three are passed directly to the JVM and support format/units as
|
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. For example:
|
||||||
`<size>[g|G|m|M|k|K]`. For example:
|
|
||||||
|
|
||||||
-e MEMORY=2G
|
-e MEMORY=2G
|
||||||
|
|
||||||
|
> NOTE: the settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
|
||||||
|
|
||||||
### JVM Options
|
### JVM Options
|
||||||
|
|
||||||
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#set -x
|
#set -x
|
||||||
# Use this variable to indicate a list of branches that docker hub is watching
|
# Use this variable to indicate a list of branches that docker hub is watching
|
||||||
branches_list=('openj9' 'openj9-11' 'openj9-nightly' 'adopt11' 'adopt13' 'adopt14' 'adopt15' 'multiarch' 'multiarch-latest')
|
branches_list=('java8' 'java8-multiarch' 'openj9' 'openj9-11' 'adopt11' 'java15' 'multiarch' 'multiarch-latest')
|
||||||
|
|
||||||
function TrapExit {
|
function TrapExit {
|
||||||
echo "Checking out back in master"
|
echo "Checking out back in master"
|
||||||
|
|||||||
@@ -88,6 +88,10 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FORGE)
|
FORGE)
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||||
|
log " since some mods require Java 8"
|
||||||
|
log "**********************************************************************"
|
||||||
exec ${SCRIPTS:-/}start-deployForge "$@"
|
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user