mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-04-02 03:42:43 +00:00
Compare commits
10 Commits
2026.3.0
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe1c02205c | ||
|
|
93305d9a71 | ||
|
|
6d4ecb2177 | ||
|
|
27cce97b00 | ||
|
|
1aaa9715b8 | ||
|
|
46f6ec6aa5 | ||
|
|
ddb3dbf776 | ||
|
|
1cf70665bb | ||
|
|
a543ee7ebc | ||
|
|
a69017b5e1 |
3
.github/dependabot.yml
vendored
3
.github/dependabot.yml
vendored
@@ -16,6 +16,9 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
groups:
|
groups:
|
||||||
|
docker:
|
||||||
|
patterns:
|
||||||
|
- "docker/*"
|
||||||
patches:
|
patches:
|
||||||
patterns:
|
patterns:
|
||||||
- "*"
|
- "*"
|
||||||
|
|||||||
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -102,7 +102,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5.10.0
|
uses: docker/metadata-action@v6.0.0
|
||||||
with:
|
with:
|
||||||
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
||||||
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
||||||
@@ -132,13 +132,13 @@ jobs:
|
|||||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.12.0
|
uses: docker/setup-buildx-action@v4.0.0
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3.7.0
|
uses: docker/setup-qemu-action@v4.0.0
|
||||||
|
|
||||||
- name: Build for test
|
- name: Build for test
|
||||||
uses: docker/build-push-action@v6.19.2
|
uses: docker/build-push-action@v7.0.0
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: ${{ env.IMAGE_TO_TEST }}
|
tags: ${{ env.IMAGE_TO_TEST }}
|
||||||
@@ -163,14 +163,14 @@ jobs:
|
|||||||
tests/test.sh
|
tests/test.sh
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3.7.0
|
uses: docker/login-action@v4.0.0
|
||||||
if: env.HAS_IMAGE_REPO_ACCESS
|
if: env.HAS_IMAGE_REPO_ACCESS
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
uses: docker/login-action@v3.7.0
|
uses: docker/login-action@v4.0.0
|
||||||
if: env.HAS_IMAGE_REPO_ACCESS
|
if: env.HAS_IMAGE_REPO_ACCESS
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
@@ -178,7 +178,7 @@ jobs:
|
|||||||
password: ${{ github.token }}
|
password: ${{ github.token }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6.19.2
|
uses: docker/build-push-action@v7.0.0
|
||||||
if: github.actor == github.repository_owner
|
if: github.actor == github.repository_owner
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
|
|||||||
6
.github/workflows/verify-pr.yml
vendored
6
.github/workflows/verify-pr.yml
vendored
@@ -59,10 +59,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.12.0
|
uses: docker/setup-buildx-action@v4.0.0
|
||||||
|
|
||||||
- name: Confirm multi-arch build
|
- name: Confirm multi-arch build
|
||||||
uses: docker/build-push-action@v6.19.2
|
uses: docker/build-push-action@v7.0.0
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
# ensure latest base image is used
|
# ensure latest base image is used
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||||
|
|
||||||
- name: Build for test
|
- name: Build for test
|
||||||
uses: docker/build-push-action@v6.19.2
|
uses: docker/build-push-action@v7.0.0
|
||||||
with:
|
with:
|
||||||
# Only build single platform since loading multi-arch image into daemon fails with
|
# Only build single platform since loading multi-arch image into daemon fails with
|
||||||
# "docker exporter does not currently support exporting manifest lists"
|
# "docker exporter does not currently support exporting manifest lists"
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
python:
|
|
||||||
install:
|
|
||||||
- requirements: docs/requirements.txt
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
os: ubuntu-24.04
|
os: ubuntu-24.04
|
||||||
tools:
|
tools:
|
||||||
python: latest
|
python: "3.14"
|
||||||
jobs:
|
jobs:
|
||||||
# We recommend using a requirements file for reproducible builds.
|
# We recommend using a requirements file for reproducible builds.
|
||||||
# This is just a quick example to get started.
|
# This is just a quick example to get started.
|
||||||
# https://docs.readthedocs.io/page/guides/reproducible-builds.html
|
# https://docs.readthedocs.io/page/guides/reproducible-builds.html
|
||||||
install:
|
install:
|
||||||
- pip install zensical
|
- pip install -r docs/requirements.txt
|
||||||
build:
|
build:
|
||||||
html:
|
html:
|
||||||
- zensical build
|
- zensical build
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
||||||
ARG MC_SERVER_RUNNER_VERSION=1.14.1
|
ARG MC_SERVER_RUNNER_VERSION=1.14.2
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ apk add --no-cache -U \
|
|||||||
libpcap \
|
libpcap \
|
||||||
libwebp \
|
libwebp \
|
||||||
libcap \
|
libcap \
|
||||||
|
numactl \
|
||||||
${EXTRA_ALPINE_PACKAGES}
|
${EXTRA_ALPINE_PACKAGES}
|
||||||
|
|
||||||
# Download and install patched knockd
|
# Download and install patched knockd
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ apt-get install -y \
|
|||||||
lbzip2 \
|
lbzip2 \
|
||||||
nfs-common \
|
nfs-common \
|
||||||
libpcap0.8 \
|
libpcap0.8 \
|
||||||
|
libnuma1 \
|
||||||
${EXTRA_DEB_PACKAGES}
|
${EXTRA_DEB_PACKAGES}
|
||||||
|
|
||||||
# Install Git LFS
|
# Install Git LFS
|
||||||
|
|||||||
@@ -1,4 +1,84 @@
|
|||||||
|
|
||||||
|
## Simple image additions
|
||||||
|
|
||||||
|
You can easily build upon the base image using an inline Dockerfile.
|
||||||
|
|
||||||
|
```yaml title="compose.yaml"
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile_inline: |
|
||||||
|
FROM itzg/minecraft-server:latest
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
webp \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
pull: true # Always pull new base image
|
||||||
|
pull_policy: build
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
ports:
|
||||||
|
- "25565:25565/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is an example to add Nvidia GPU support for C2ME:
|
||||||
|
|
||||||
|
??? Example "C2ME GPU example"
|
||||||
|
```yaml title="compose.yaml"
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile_inline: |
|
||||||
|
FROM itzg/minecraft-server:java25
|
||||||
|
|
||||||
|
# Install OpenCL loader and NVIDIA driver capabilities
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
ocl-icd-libopencl1 \
|
||||||
|
opencl-headers \
|
||||||
|
clinfo \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# 1. Create the vendor directory
|
||||||
|
# 2. Tell OpenCL to use the NVIDIA library
|
||||||
|
RUN mkdir -p /etc/OpenCL/vendors && \
|
||||||
|
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
|
||||||
|
|
||||||
|
# Tell the NVIDIA container runtime to expose all GPU capabilities (including compute/utility)
|
||||||
|
ENV NVIDIA_VISIBLE_DEVICES all
|
||||||
|
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,graphics,video
|
||||||
|
|
||||||
|
COPY ./mods /mods
|
||||||
|
pull: true # Always pull new base image
|
||||||
|
pull_policy: build
|
||||||
|
restart: unless-stopped
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
count: 1
|
||||||
|
capabilities: [gpu]
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
TYPE: "FABRIC"
|
||||||
|
VERSION: 1.21.10
|
||||||
|
MEMORY: 8G
|
||||||
|
MODRINTH_PROJECTS: |-
|
||||||
|
fabric-api
|
||||||
|
c2me
|
||||||
|
ports:
|
||||||
|
- "25565:25565/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
!!! tip "For advanced use only"
|
!!! tip "For advanced use only"
|
||||||
|
|
||||||
This page describes a capability that is not applicable to most users. It is only intended for rare cases when a very specific Java base image is needed or additional packages need to be installed that are not generally applicable or would bloat the image size.
|
This page describes a capability that is not applicable to most users. It is only intended for rare cases when a very specific Java base image is needed or additional packages need to be installed that are not generally applicable or would bloat the image size.
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ PyYAML==6.0.3
|
|||||||
pyyaml_env_tag==1.1
|
pyyaml_env_tag==1.1
|
||||||
six==1.17.0
|
six==1.17.0
|
||||||
watchdog==6.0.0
|
watchdog==6.0.0
|
||||||
# zensical @ file:///
|
zensical==0.0.24
|
||||||
|
|||||||
Reference in New Issue
Block a user