mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-24 01:56:24 +00:00
Compare commits
2 Commits
2021.3.0-j
...
2021.2.0-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d3ca813ed | ||
|
|
e97a00e61d |
3
.github/workflows/build-multiarch.yml
vendored
3
.github/workflows/build-multiarch.yml
vendored
@@ -3,14 +3,11 @@ 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,18 +4,23 @@ 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:
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
FROM adoptopenjdk:15-jre
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
|
openjdk-8-jre-headless \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
gosu \
|
gosu \
|
||||||
sudo \
|
sudo \
|
||||||
|
|||||||
58
README.md
58
README.md
@@ -160,31 +160,24 @@ 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 | Java version | Linux | JVM Type | Architecture |
|
| Tag name | Description | Linux |
|
||||||
| -------------- | -------------|--------|----------|-------------------|
|
| -------------- | ------------------------------------------- | ------------ |
|
||||||
| latest | 11 | Alpine | Hotspot | amd64 |
|
| latest | **Default**. Uses Java version 8 | Alpine Linux |
|
||||||
| java8 | 8 | Alpine | Hotspot | amd64 |
|
| adopt15 | Uses Java version 15 from AdoptOpenJDK | Alpine Linux |
|
||||||
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
|
| adopt14 | Uses Java version 14 from AdoptOpenJDK | Alpine Linux |
|
||||||
| java15 | 15 | Debian | Hotspot | amd64,arm64,armv7 |
|
| adopt13 | Uses Java version 13 from AdoptOpenJDK | Alpine Linux |
|
||||||
| adopt11 | 11 | Alpine | Hotspot | amd64 |
|
| adopt11 | Uses Java version 11 from AdoptOpenJDK | Alpine Linux |
|
||||||
| openj9 | 8 | Alpine | OpenJ9 | amd64 |
|
| openj9 | Uses Eclipse OpenJ9 JVM | Alpine Linux |
|
||||||
| openj9-11 | 11 | Alpine | OpenJ9 | amd64 |
|
| openj9-11 | Uses Eclipse OpenJ9 JVM for Java 11 | Alpine Linux |
|
||||||
| multiarch | 11 | Debian | Hotspot | amd64,arm64,armv7 |
|
| openj9-nightly | Uses Eclipse OpenJ9 JVM testing builds | Alpine Linux |
|
||||||
| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 |
|
| multiarch | Uses Java version 8 latest update | Debian Linux |
|
||||||
|
| multiarch-latest | Uses Java version 15 latest update | Debian Linux |
|
||||||
|
|
||||||
For example, to use Java version 15 on any supported architecture:
|
For example, to use a Java version 13:
|
||||||
|
|
||||||
docker run --name mc itzg/minecraft-server:java15
|
docker run --name mc itzg/minecraft-server:adopt13
|
||||||
|
|
||||||
> 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
|
||||||
|
|
||||||
@@ -515,7 +508,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 one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
> **NOTE** requires `itzg/minecraft-server:multiarch` image
|
||||||
|
|
||||||
[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.
|
||||||
|
|
||||||
@@ -965,7 +958,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, for example
|
be configured by setting `LEVEL_TYPE` to an expected type, such as
|
||||||
|
|
||||||
- DEFAULT
|
- DEFAULT
|
||||||
- FLAT
|
- FLAT
|
||||||
@@ -973,8 +966,6 @@ be configured by setting `LEVEL_TYPE` to an expected type, for example
|
|||||||
- 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).
|
||||||
|
|
||||||
@@ -1105,18 +1096,19 @@ is passed to `docker run`.
|
|||||||
|
|
||||||
### Memory Limit
|
### Memory Limit
|
||||||
|
|
||||||
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:
|
By default, the image declares a Java initial and maximum memory limit of 1 GB. There are several
|
||||||
|
ways to adjust the memory settings:
|
||||||
|
|
||||||
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
|
- `MEMORY`, "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`)
|
||||||
- `INIT_MEMORY`: independently sets the initial heap size
|
memory settings of the JVM
|
||||||
- `MAX_MEMORY`: independently sets the max heap size
|
- `INIT_MEMORY`, independently sets the initial 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 `<size>[g|G|m|M|k|K]`. For example:
|
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:
|
||||||
|
|
||||||
-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=('java8' 'java8-multiarch' 'openj9' 'openj9-11' 'adopt11' 'java15' 'multiarch' 'multiarch-latest')
|
branches_list=('openj9' 'openj9-11' 'openj9-nightly' 'adopt11' 'adopt13' 'adopt14' 'adopt15' 'multiarch' 'multiarch-latest')
|
||||||
|
|
||||||
function TrapExit {
|
function TrapExit {
|
||||||
echo "Checking out back in master"
|
echo "Checking out back in master"
|
||||||
|
|||||||
@@ -88,10 +88,6 @@ 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