Skip to content

Commit e3275bc

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into feat/use-data-tmp-for-world-extraction
2 parents 0b5d7ab + ae4756f commit e3275bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+407
-175
lines changed

.github/workflows/build-multiarch.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
matrix:
2121
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
2222
variant:
23-
- java23
24-
- java23-graalvm
23+
- java24
24+
- java24-graalvm
2525
- java21
2626
- java21-alpine
2727
- java21-graalvm
@@ -33,15 +33,14 @@ jobs:
3333
- java8-graalvm-ce
3434
- java8-openj9
3535
- java8-jdk
36-
- java11
3736
include:
38-
# JAVA 23
39-
- variant: java23
40-
baseImage: eclipse-temurin:23-jre
37+
# JAVA 24
38+
- variant: java24
39+
baseImage: eclipse-temurin:24-jre
4140
platforms: linux/amd64,linux/arm64
4241
mcVersion: latest
43-
- variant: java23-graalvm
44-
baseImage: container-registry.oracle.com/graalvm/jdk:23-ol8
42+
- variant: java24-graalvm
43+
baseImage: container-registry.oracle.com/graalvm/jdk:24-ol8
4544
platforms: linux/amd64,linux/arm64
4645
mcVersion: latest
4746
# JAVA 21:
@@ -75,11 +74,6 @@ jobs:
7574
baseImage: eclipse-temurin:17-jre-alpine
7675
platforms: linux/amd64
7776
mcVersion: 1.20.4
78-
# JAVA 11:
79-
- variant: java11
80-
baseImage: adoptopenjdk:11-jre-hotspot
81-
platforms: linux/amd64,linux/arm/v7,linux/arm64
82-
mcVersion: 1.16.5
8377
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
8478
- variant: java8
8579
baseImage: eclipse-temurin:8u312-b07-jre-focal
@@ -111,7 +105,7 @@ jobs:
111105

112106
- name: Docker meta
113107
id: meta
114-
uses: docker/metadata-action@v5.6.1
108+
uses: docker/metadata-action@v5.7.0
115109
with:
116110
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
117111
# then the use of ${{ github.repository_owner }} will need to be replaced.
@@ -139,13 +133,13 @@ jobs:
139133
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
140134
141135
- name: Setup Docker Buildx
142-
uses: docker/setup-buildx-action@v3.9.0
136+
uses: docker/setup-buildx-action@v3.10.0
143137

144138
- name: Set up QEMU
145-
uses: docker/setup-qemu-action@v3.4.0
139+
uses: docker/setup-qemu-action@v3.6.0
146140

147141
- name: Build for test
148-
uses: docker/build-push-action@v6.13.0
142+
uses: docker/build-push-action@v6.16.0
149143
with:
150144
platforms: linux/amd64
151145
tags: ${{ env.IMAGE_TO_TEST }}
@@ -168,22 +162,22 @@ jobs:
168162
tests/test.sh
169163
170164
- name: Login to DockerHub
171-
uses: docker/login-action@v3.3.0
165+
uses: docker/login-action@v3.4.0
172166
if: env.HAS_IMAGE_REPO_ACCESS
173167
with:
174168
username: ${{ secrets.DOCKER_USER }}
175169
password: ${{ secrets.DOCKER_PASSWORD }}
176170

177171
- name: Login to GHCR
178-
uses: docker/login-action@v3.3.0
172+
uses: docker/login-action@v3.4.0
179173
if: env.HAS_IMAGE_REPO_ACCESS
180174
with:
181175
registry: ghcr.io
182176
username: ${{ github.actor }}
183177
password: ${{ github.token }}
184178

185179
- name: Build and push
186-
uses: docker/build-push-action@v6.13.0
180+
uses: docker/build-push-action@v6.16.0
187181
if: github.actor == github.repository_owner
188182
with:
189183
platforms: ${{ matrix.platforms }}
@@ -207,5 +201,8 @@ jobs:
207201
build-args: |
208202
BASE_IMAGE=${{ matrix.baseImage }}
209203
BUILD_FILES_REV=${{ steps.build-files-rev.outputs.REV }}
204+
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
205+
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
206+
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
210207
cache-from: type=gha,scope=${{ matrix.variant }}
211208
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}

.github/workflows/verify-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ jobs:
5353
fetch-depth: 0
5454

5555
- name: Setup Docker Buildx
56-
uses: docker/setup-buildx-action@v3.9.0
56+
uses: docker/setup-buildx-action@v3.10.0
5757

5858
- name: Confirm multi-arch build
59-
uses: docker/build-push-action@v6.13.0
59+
uses: docker/build-push-action@v6.16.0
6060
with:
6161
platforms: ${{ matrix.platforms }}
6262
# ensure latest base image is used
@@ -66,7 +66,7 @@ jobs:
6666
cache-from: type=gha,scope=${{ matrix.variant }}
6767

6868
- name: Build for test
69-
uses: docker/build-push-action@v6.13.0
69+
uses: docker/build-push-action@v6.16.0
7070
with:
7171
# Only build single platform since loading multi-arch image into daemon fails with
7272
# "docker exporter does not currently support exporting manifest lists"

Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ EXPOSE 25565
2626
ARG APPS_REV=1
2727
ARG GITHUB_BASEURL=https://github.com
2828

29-
ARG EASY_ADD_VERSION=0.8.9
29+
ARG EASY_ADD_VERSION=0.8.10
3030
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
3131
RUN chmod +x /usr/bin/easy-add
3232

33-
ARG RESTIFY_VERSION=1.7.7
33+
ARG RESTIFY_VERSION=1.7.9
3434
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
3535
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
3636
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
3737

38-
ARG RCON_CLI_VERSION=1.6.11
38+
ARG RCON_CLI_VERSION=1.7.0
3939
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4040
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
4141
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
4242

43-
ARG MC_MONITOR_VERSION=0.15.3
43+
ARG MC_MONITOR_VERSION=0.15.5
4444
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4545
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
4646
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
@@ -50,7 +50,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
5050
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
5151
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
5252

53-
ARG MC_HELPER_VERSION=1.40.13
53+
ARG MC_HELPER_VERSION=1.41.9
5454
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
5555
# used for cache busting local copy of mc-image-helper
5656
ARG MC_HELPER_REV=1
@@ -78,3 +78,8 @@ RUN dos2unix /start* /auto/*
7878

7979
ENTRYPOINT [ "/start" ]
8080
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
81+
82+
ARG BUILDTIME=local
83+
ARG VERSION=local
84+
ARG REVISION=local
85+
RUN echo "buildtime=${BUILDTIME}\nversion=${VERSION}\nrevision=${REVISION}" > /etc/image.properties

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[![Docker Pulls](https://img.shields.io/docker/pulls/itzg/minecraft-server.svg)](https://hub.docker.com/r/itzg/minecraft-server/)
2-
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?maxAge=2592000)](https://hub.docker.com/r/itzg/minecraft-server/)
1+
[![Docker Pulls](https://img.shields.io/docker/pulls/itzg/minecraft-server.svg?logo=docker)](https://hub.docker.com/r/itzg/minecraft-server/)
2+
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?logo=docker)](https://hub.docker.com/r/itzg/minecraft-server/)
33
[![GitHub Issues](https://img.shields.io/github/issues-raw/itzg/docker-minecraft-server.svg)](https://github.com/itzg/docker-minecraft-server/issues)
44
[![Discord](https://img.shields.io/discord/660567679458869252?label=Discord&logo=discord)](https://discord.gg/DXfKpjB)
55
[![Build and Publish](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml/badge.svg)](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml)

docs/configuration/jvm-options.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ To let the JVM calculate the heap size from the container declared memory limit,
4646
MEMORY: ""
4747
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
4848
deploy:
49-
limits:
50-
memory: 4G
49+
resources:
50+
limits:
51+
memory: 4G
5152
```
5253

5354
!!! important

docs/configuration/server-properties.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,34 @@ New to [22W42A](https://www.minecraft.net/en-us/article/minecraft-snapshot-22w42
197197

198198
### Server icon
199199

200-
A server icon can be configured using the `ICON` variable. The image will be automatically
201-
downloaded, scaled, and converted from any other image format:
200+
A server icon can be configured by setting the `ICON` variable to a URL to download or a container path. The image will be automatically downloaded (if a URL), scaled, and converted from any other image format:
202201

203-
docker run -d -e ICON=http://..../some/image.png ...
202+
!!! example
204203

205-
The server icon which has been set doesn't get overridden by default. It can be changed and overridden by setting `OVERRIDE_ICON` to `TRUE`.
204+
Using `docker run`:
205+
206+
```
207+
docker run -d -e ICON=http://..../some/image.png ...
208+
```
209+
210+
In compose file:
211+
212+
```yaml
213+
environment:
214+
ICON: http://..../some/image.png
215+
```
216+
217+
Using a file from host filesystem:
218+
219+
```yaml
220+
environment:
221+
ICON: /icon.png
222+
OVERRIDE_ICON: true
223+
volumes:
224+
./icon.png:/icon.png
225+
```
206226

207-
docker run -d -e ICON=http://..../some/other/image.png -e OVERRIDE_ICON=TRUE...
227+
By default an existing `server-icon.png` file will not be replaced, that can be changed by setting `OVERRIDE_ICON` to "true".
208228

209229
### RCON
210230

@@ -502,4 +522,4 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
502522
| LOG_IPS | log-ips |
503523
| REGION_FILE_COMPRESSION | region-file-compression |
504524
| BUG_REPORT_LINK | bug-report-link |
505-
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
525+
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |

docs/misc/autopause-autostop/autopause.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ The following environment variables define the behaviour of auto-pausing:
3838
describes period of the daemonized state machine, that handles the pausing of the process (resuming is done independently)
3939
- `AUTOPAUSE_KNOCK_INTERFACE`, default `eth0`
4040
<br>Describes the interface passed to the `knockd` daemon. If the default interface does not work, run the `ifconfig` command inside the container and derive the interface receiving the incoming connection from its output. The passed interface must exist inside the container. Using the loopback interface (`lo`) does likely not yield the desired results.
41+
- `AUTOPAUSE_STATUS_RETRY_LIMIT`, default 10
42+
- `AUTOPAUSE_STATUS_RETRY_INTERVAL`, default 2s
4143

4244
!!! tip
4345

docs/misc/autopause-autostop/autostop.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ Enable the Autostop functionality by setting:
1717
```
1818

1919
The following environment variables define the behavior of auto-stopping:
20-
* `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
20+
- `AUTOSTOP_TIMEOUT_EST`, default `3600` (seconds)
2121
describes the time between the last client disconnect and the stopping of the server (read as timeout established)
22-
* `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
22+
- `AUTOSTOP_TIMEOUT_INIT`, default `1800` (seconds)
2323
describes the time between server start and the stopping of the server, when no client connects in-between (read as timeout initialized)
24-
* `AUTOSTOP_PERIOD`, default `10` (seconds)
24+
- `AUTOSTOP_PERIOD`, default `10` (seconds)
2525
describes period of the daemonized state machine, that handles the stopping of the server
26+
- `AUTOPAUSE_STATUS_RETRY_LIMIT`, default 10
27+
- `AUTOPAUSE_STATUS_RETRY_INTERVAL`, default 2s
2628

2729
> To troubleshoot, add `DEBUG_AUTOSTOP=true` to see additional output
2830

docs/misc/examples.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,33 @@ services:
3131
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
3232
3333
```yaml
34+
# Lazymc requires that the minecraft server have a static IP.
35+
#
36+
# To ensure that our servers have a static IP we need to create
37+
# a network for our services to use.
38+
#
39+
# By default, Docker uses 172.17.0.0/16 subnet range.
40+
# So we need to create a new network in a different subnet
41+
# See the readme for more information.
42+
#
43+
# Please ensure that the subnet falls within the private CIDRs:
44+
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
45+
#
46+
# And that it is not in use by anything else.
47+
networks:
48+
minecraft-network:
49+
driver: bridge
50+
ipam:
51+
config:
52+
- subnet: 172.18.0.0/16
53+
3454
services:
3555
lazymc:
36-
container_name: lazymc
3756
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
38-
environment:
39-
# Point to the service name of the Minecraft server
40-
SERVER_ADDRESS: mc:25565
41-
# Required to find the container to manage it
42-
LAZYMC_GROUP: mc
57+
# the IPs should start at .2 as .1 is reserved for the gateway
58+
networks:
59+
minecraft-network:
60+
ipv4_address: 172.18.0.2
4361
restart: unless-stopped
4462
volumes:
4563
# you should mount the minecraft server dir under /server, using read only.
@@ -54,11 +72,19 @@ services:
5472
# Standard Docker Minecraft server, also works with other server types
5573
mc:
5674
image: itzg/minecraft-server:java21
57-
container_name: minecraft-server
75+
# Assign a static IP to the server container
76+
networks:
77+
minecraft-network:
78+
ipv4_address: 172.18.0.3
5879
# We need to add a label here so that lazymc-docker-proxy knows which
5980
# container to manage
6081
labels:
82+
# Set lazymc.enabled to true to enable lazymc on this container
83+
- lazymc.enabled=true
84+
# Required to find the container to manage it
6185
- lazymc.group=mc
86+
# Point to the service name of the Minecraft server
87+
- lazymc.server.address=mc:25565
6288
tty: true
6389
stdin_open: true
6490
# This container should be managed solely by the lazymc container
@@ -113,4 +139,4 @@ services:
113139
stdin_open: true
114140
restart: unless-stopped
115141
```
116-
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
142+
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)

docs/misc/troubleshooting.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,34 @@ To troubleshoot just the command-line used to start the Minecraft server, set th
55
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
66

77
If you are experiencing any issues with the "Changing ownership of /data" step, that can be disabled by setting `SKIP_CHOWN_DATA` to `true`.
8+
9+
To confirm the image version that has been pulled, use the following command, replacing `itzg/minecraft-server` as needed for specific image tags:
10+
11+
## Image labels
12+
13+
```shell
14+
docker image inspect itzg/minecraft-server -f "{{json .Config.Labels}}"
15+
```
16+
17+
such as
18+
19+
```json
20+
{
21+
"org.opencontainers.image.authors": "... <...@gmail.com>",
22+
"org.opencontainers.image.created": "2025-04-03T02:15:51.405Z",
23+
"org.opencontainers.image.description": "Docker image that provides a Minecraft Server for Java Edition that automatically downloads selected version at startup",
24+
"org.opencontainers.image.licenses": "Apache-2.0",
25+
"org.opencontainers.image.ref.name": "ubuntu",
26+
"org.opencontainers.image.revision": "d6897a649ecbc16b5fb2e1500e24b64ef80270a0",
27+
"org.opencontainers.image.source": "https://github.com/itzg/docker-minecraft-server",
28+
"org.opencontainers.image.title": "docker-minecraft-server",
29+
"org.opencontainers.image.url": "https://github.com/itzg/docker-minecraft-server",
30+
"org.opencontainers.image.version": "java21"
31+
}
32+
```
33+
34+
The labels that are most interesting are:
35+
36+
- `org.opencontainers.image.created` : the date/time the image was built
37+
- `org.opencontainers.image.revision` : which maps to <https://github.com/itzg/docker-minecraft-server/commit/REVISION>
38+
- `org.opencontainers.image.version` : image tag and variant [as described in this page](../versions/java.md)

0 commit comments

Comments
 (0)