mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-02 05:32:16 +00:00
Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbca7982c5 | ||
|
|
ce6ce0adbc | ||
|
|
5e0e7999a9 | ||
|
|
34e661267d | ||
|
|
55a539860e | ||
|
|
26b5647ca2 | ||
|
|
bfdb5c075b | ||
|
|
bd4a184ad7 | ||
|
|
156786dacf | ||
|
|
92186c9c8e | ||
|
|
74ee8a621c | ||
|
|
64345b0d82 | ||
|
|
5b45c4ea4e | ||
|
|
a15e608421 | ||
|
|
f4561b7a3b | ||
|
|
c6f0042686 | ||
|
|
79aabf82ff | ||
|
|
89b60c7706 | ||
|
|
4b4cbdfce1 | ||
|
|
a424346d0c | ||
|
|
fad48505d7 | ||
|
|
a535fb7873 |
@@ -1,25 +0,0 @@
|
|||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
minecraft_server:
|
|
||||||
docker:
|
|
||||||
- image: circleci/buildpack-deps:stable
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- setup_remote_docker
|
|
||||||
- run:
|
|
||||||
name: Build image
|
|
||||||
command: docker build -t itzg/minecraft-server:${CIRCLE_BRANCH} .
|
|
||||||
# - run:
|
|
||||||
# name: Build arm v7 image
|
|
||||||
# command: docker build -t itzg/minecraft-server:${CIRCLE_BRANCH}-arm-v7 --platform linux/arm/v7 --build-arg ARCH=armv7 .
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
build:
|
|
||||||
jobs:
|
|
||||||
- minecraft_server:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- armv7
|
|
||||||
- multiarch
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
name: Build and publish multiarch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- multiarch
|
|
||||||
tags:
|
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker-buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2.2.0
|
|
||||||
- name: Get branch name
|
|
||||||
uses: nelonoel/branch-name@v1
|
|
||||||
- name: Docker Buildx
|
|
||||||
uses: ilteoood/docker_buildx@1.0.4
|
|
||||||
with:
|
|
||||||
publish: true
|
|
||||||
imageName: itzg/minecraft-server
|
|
||||||
tag: ${{ env.BRANCH_NAME }}
|
|
||||||
dockerHubUser: ${{ secrets.DOCKER_USER }}
|
|
||||||
dockerHubPassword: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
FROM adoptopenjdk/openjdk8-openj9:alpine
|
FROM adoptopenjdk/openjdk11:alpine-jre
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ COPY log4j2.xml /tmp/log4j2.xml
|
|||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
ENV UID=1000 GID=1000 \
|
ENV UID=1000 GID=1000 \
|
||||||
MEMORY="1G" \
|
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
||||||
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||||
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||||
|
|||||||
@@ -1056,14 +1056,6 @@ via a `JVM_XX_OPTS` environment variable.
|
|||||||
For some cases, if e.g. after removing mods, it could be necessary to startup minecraft with an additional `-D` parameter like `-Dfml.queryResult=confirm`. To address this you can use the environment variable `JVM_DD_OPTS`, which builds the params from a given list of values separated by space, but without the `-D` prefix. To make things running under systems (e.g. Plesk), which doesn't allow `=` inside values, a `:` (colon) could be used instead. The upper example would look like this:
|
For some cases, if e.g. after removing mods, it could be necessary to startup minecraft with an additional `-D` parameter like `-Dfml.queryResult=confirm`. To address this you can use the environment variable `JVM_DD_OPTS`, which builds the params from a given list of values separated by space, but without the `-D` prefix. To make things running under systems (e.g. Plesk), which doesn't allow `=` inside values, a `:` (colon) could be used instead. The upper example would look like this:
|
||||||
`JVM_DD_OPTS=fml.queryResult:confirm`, and will be converted to `-Dfml.queryResult=confirm`.
|
`JVM_DD_OPTS=fml.queryResult:confirm`, and will be converted to `-Dfml.queryResult=confirm`.
|
||||||
|
|
||||||
The container uses [OpenJ9](https://www.eclipse.org/openj9/docs) and a couple of J9 options are
|
|
||||||
simplified by environment variables:
|
|
||||||
|
|
||||||
- `-e TUNE_VIRTUALIZED=TRUE` : enables the option to
|
|
||||||
[optimize for virtualized environments](https://www.eclipse.org/openj9/docs/xtunevirtualized/)
|
|
||||||
- `-e TUNE_NURSERY_SIZES=TRUE` : configures nursery sizes where the initial size is 50%
|
|
||||||
of the `MAX_MEMORY` and the max size is 80%.
|
|
||||||
|
|
||||||
### Enable Remote JMX for Profiling
|
### Enable Remote JMX for Profiling
|
||||||
|
|
||||||
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true` and add a port forwarding of TCP port 7091, such as:
|
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true` and add a port forwarding of TCP port 7091, such as:
|
||||||
|
|||||||
@@ -88,23 +88,6 @@ if [ -n "$JVM_DD_OPTS" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if isTrue ${TUNE_VIRTUALIZED}; then
|
|
||||||
JVM_XX_OPTS="${JVM_XX_OPTS} -Xtune:virtualized"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if isTrue ${TUNE_NURSERY_SIZES}; then
|
|
||||||
case ${MAX_MEMORY^^} in
|
|
||||||
*G)
|
|
||||||
MAX_MEMORY_MB=$(( ${MAX_MEMORY%?} * 1024 )) ;;
|
|
||||||
*M)
|
|
||||||
MAX_MEMORY_MB=${MAX_MEMORY%?} ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
NURSERY_MINIMUM=$(( ${MAX_MEMORY_MB} / 2 ))
|
|
||||||
NURSERY_MAXIMUM=$(( ${MAX_MEMORY_MB} * 4/5 ))
|
|
||||||
JVM_XX_OPTS="${JVM_XX_OPTS} -Xmns${NURSERY_MINIMUM}M -Xmnx${NURSERY_MAXIMUM}M"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if isTrue ${ENABLE_JMX}; then
|
if isTrue ${ENABLE_JMX}; then
|
||||||
: ${JMX_HOST:=0.0.0.0}
|
: ${JMX_HOST:=0.0.0.0}
|
||||||
: ${JMX_PORT:=7091}
|
: ${JMX_PORT:=7091}
|
||||||
|
|||||||
Reference in New Issue
Block a user