mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32b343840f | ||
|
|
0a98bee40e | ||
|
|
93d94f5ba8 | ||
|
|
f3ed09882b | ||
|
|
7325baf750 | ||
|
|
c23654008b | ||
|
|
f8ff8a7b8a | ||
|
|
9c01462c0c | ||
|
|
21c5c980d5 | ||
|
|
4458908a44 |
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@@ -175,6 +175,7 @@ jobs:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
|
||||
1
.github/workflows/verify-pr.yml
vendored
1
.github/workflows/verify-pr.yml
vendored
@@ -92,5 +92,6 @@ jobs:
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
DEBUG: ${{ runner.debug }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
*.iml
|
||||
/gh-md-toc
|
||||
personal-build-and-develop.*
|
||||
site/
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
mkdocs:
|
||||
configuration: mkdocs.yml
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
version: 2
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
|
||||
build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: latest
|
||||
jobs:
|
||||
# We recommend using a requirements file for reproducible builds.
|
||||
# This is just a quick example to get started.
|
||||
# https://docs.readthedocs.io/page/guides/reproducible-builds.html
|
||||
install:
|
||||
- pip install zensical
|
||||
build:
|
||||
html:
|
||||
- zensical build
|
||||
post_build:
|
||||
- mkdir -p $READTHEDOCS_OUTPUT/html/
|
||||
- cp --recursive site/* $READTHEDOCS_OUTPUT/html/
|
||||
|
||||
@@ -68,6 +68,7 @@ dnf clean all
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
ls -l /usr/local/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials globally
|
||||
|
||||
16
compose-docs.yml
Normal file
16
compose-docs.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# This composition can be used to serve up the rendered mkdocs for local authoring.
|
||||
#
|
||||
# docker compose -f compose-docs.yml -p zensical up
|
||||
#
|
||||
# and then access http://localhost:8000
|
||||
|
||||
services:
|
||||
zensical:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docs/Dockerfile
|
||||
volumes:
|
||||
- ./zensical.toml:/docs/zensical.toml
|
||||
- ./docs:/docs/docs
|
||||
ports:
|
||||
- "8000:8000"
|
||||
@@ -1,19 +0,0 @@
|
||||
# This composition can be used to serve up the rendered mkdocs for local authoring.
|
||||
#
|
||||
# docker compose -f docker-compose-mkdocs.yml -p mkdocs up
|
||||
#
|
||||
# and then access http://localhost:8000
|
||||
|
||||
services:
|
||||
mkdocs:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docs/Dockerfile
|
||||
volumes:
|
||||
- ./mkdocs.yml:/mkdocs/mkdocs.yml
|
||||
- ./docs:/mkdocs/docs
|
||||
command:
|
||||
- serve
|
||||
- --dev-addr=0.0.0.0:8000
|
||||
ports:
|
||||
- "8000:8000"
|
||||
@@ -1,10 +1,4 @@
|
||||
FROM python:3.11
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
WORKDIR /mkdocs
|
||||
FROM zensical/zensical
|
||||
|
||||
RUN --mount=target=/build/requirements.txt,source=docs/requirements.txt \
|
||||
pip install -r /build/requirements.txt
|
||||
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
@@ -81,6 +81,8 @@ The openj9 image tags include specific variables to simplify configuration:
|
||||
|
||||
The image now uses a templated log4j2 configuration based on PaperMC's logging setup, which is automatically applied for versions that don't require Log4j security patches. This configuration provides rolling logs and advanced logging features by default.
|
||||
|
||||
Set the environment variable `GENERATE_LOG4J2_CONFIG` to "true" to enable the following features.
|
||||
|
||||
### Customization via environment variables
|
||||
|
||||
You can customize various aspects of the logging behavior using environment variables:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Site documentation
|
||||
|
||||
The documentation for this image/repository is written in markdown and built by [MkDocs](https://www.mkdocs.org/) into a documentation website hosted at [Read the Docs](https://readthedocs.org/). [Here is general information about writing MkDocs markdown](https://www.mkdocs.org/user-guide/writing-your-docs/) and [specifics for the Material theme used](https://squidfunk.github.io/mkdocs-material/reference/).
|
||||
The documentation for this image/repository is written in markdown and built using [Zensical](https://zensical.org/) into a documentation website hosted at [Read the Docs](https://readthedocs.org/). [Here is general information about writing Zensical markdown](https://zensical.org/docs/authoring/markdown/).
|
||||
|
||||
!!! note
|
||||
The README.md rarely needs to be modified and only serves as a brief introduction to the project.
|
||||
@@ -10,7 +10,7 @@ The documentation source is maintained in the [docs](https://github.com/itzg/doc
|
||||
It will be very helpful to view the rendered documentation as you're editing. To do that run the following from the top-level directory:
|
||||
|
||||
```shell
|
||||
docker compose -f docker-compose-mkdocs.yml -p mkdocs up
|
||||
docker compose -f compose-docs.yml -p zensical up
|
||||
```
|
||||
|
||||
You can access the live documentation rendering at <http://localhost:8000>.
|
||||
You can access the live documentation rendering at <http://localhost:8000>.
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
mkdocs-material == 9.7.0
|
||||
mkdocs-autorefs == 1.4.3
|
||||
mkdocstrings[python] == 0.30.1
|
||||
mkdocs-literate-nav == 0.6.2
|
||||
mdx-gh-links == 0.4
|
||||
# need to pin for auto reload to work
|
||||
# see https://github.com/mkdocs/mkdocs/issues/4032
|
||||
click==8.2.1
|
||||
mkdocs-click == 0.9.0
|
||||
mkdocs-static-i18n == 1.3.0
|
||||
click==8.3.1
|
||||
colorama==0.4.6
|
||||
deepmerge==2.0
|
||||
ghp-import==2.1.0
|
||||
griffe==1.15.0
|
||||
Jinja2==3.1.6
|
||||
Markdown==3.10
|
||||
MarkupSafe==3.0.3
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-autorefs==1.4.3
|
||||
mkdocs-get-deps==0.2.0
|
||||
mkdocstrings==1.0.0
|
||||
mkdocstrings-python==2.0.1
|
||||
packaging==25.0
|
||||
pathspec==1.0.3
|
||||
platformdirs==4.5.1
|
||||
Pygments==2.19.2
|
||||
pymdown-extensions==10.20
|
||||
python-dateutil==2.9.0.post0
|
||||
PyYAML==6.0.3
|
||||
pyyaml_env_tag==1.1
|
||||
six==1.17.0
|
||||
watchdog==6.0.0
|
||||
# zensical @ file:///
|
||||
|
||||
17
examples/ftba/stoneblock4/compose.yml
Normal file
17
examples/ftba/stoneblock4/compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java25
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FTBA
|
||||
FTB_MODPACK_ID: "130"
|
||||
FTB_MODPACK_VERSION_ID: "100171"
|
||||
MEMORY: "4G"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- data:/data
|
||||
volumes:
|
||||
data:
|
||||
@@ -101,6 +101,7 @@
|
||||
"lootbeams",
|
||||
"magnesium-extras",
|
||||
"make-bubbles-pop",
|
||||
"mekalus-oculus-fork-with-fixed-mekanism-mekasuit",
|
||||
"menumobs",
|
||||
"minecraft-rich-presence",
|
||||
"mining-speed-tooltips",
|
||||
|
||||
95
mkdocs.yml
95
mkdocs.yml
@@ -1,95 +0,0 @@
|
||||
---
|
||||
site_name: Minecraft Server on Docker (Java Edition)
|
||||
site_url: https://docker-minecraft-server.readthedocs.io/en/latest/
|
||||
site_description: Documentation for Minecraft Server on Docker
|
||||
repo_url: https://github.com/itzg/docker-minecraft-server
|
||||
edit_uri: blob/master/docs/
|
||||
theme:
|
||||
name: material
|
||||
features:
|
||||
- navigation.tracking
|
||||
- navigation.tabs
|
||||
- navigation.tabs.sticky
|
||||
- navigation.sections
|
||||
- navigation.expand
|
||||
- navigation.top
|
||||
- navigation.indexes
|
||||
locale: en
|
||||
palette:
|
||||
# Palette toggle for automatic mode
|
||||
- media: "(prefers-color-scheme)"
|
||||
toggle:
|
||||
icon: material/brightness-auto
|
||||
name: Switch to light mode
|
||||
|
||||
# Palette toggle for light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
toggle:
|
||||
icon: material/brightness-7
|
||||
name: Switch to dark mode
|
||||
|
||||
# Palette toggle for dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
toggle:
|
||||
icon: material/brightness-4
|
||||
name: Switch to system preference
|
||||
|
||||
highlightjs: true
|
||||
hljs_languages:
|
||||
- yaml
|
||||
- bash
|
||||
- java
|
||||
- docker
|
||||
- shell
|
||||
- json
|
||||
|
||||
extra_css:
|
||||
- css/extra.css
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- toc:
|
||||
permalink: true
|
||||
- attr_list
|
||||
- def_list
|
||||
- footnotes
|
||||
- tables
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
line_spans: __span
|
||||
pygments_lang_class: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.details
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
||||
- mdx_gh_links:
|
||||
user: camalot
|
||||
repo: mkdocs-test
|
||||
- mkdocs-click
|
||||
copyright: Copyright © itzg 2025.
|
||||
plugins:
|
||||
- search
|
||||
- autorefs
|
||||
- mkdocstrings:
|
||||
handlers:
|
||||
python:
|
||||
options:
|
||||
docstring_section_style: list
|
||||
members_order: source
|
||||
show_root_heading: true
|
||||
show_source: false
|
||||
show_signature_annotations: true
|
||||
# https://github.com/ultrabug/mkdocs-static-i18n
|
||||
- i18n:
|
||||
languages:
|
||||
- locale: en
|
||||
name: English
|
||||
build: true
|
||||
default: true
|
||||
- literate-nav:
|
||||
nav_file: README.md
|
||||
implicit_index: true
|
||||
@@ -93,7 +93,7 @@ if isTrue "$FTB_FORCE_REINSTALL" ||
|
||||
|
||||
log "Installing modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
|
||||
log "This could take a while..."
|
||||
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force | tee ftb-installer.log
|
||||
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force -no-java | tee ftb-installer.log
|
||||
rm -f forge*installer.jar
|
||||
|
||||
echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FOLIA_CHANNEL:=experimental}"
|
||||
: "${FOLIA_CHANNEL:=default}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
@@ -47,7 +47,7 @@ if [ -n "$ICON" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
canUseRollingLogs=true
|
||||
useGeneratedLogs=${GENERATE_LOG4J2_CONFIG:-${ENABLE_ROLLING_LOGS:-false}}
|
||||
useFallbackJvmFlag=false
|
||||
|
||||
SERVER_DIR="$baseDataDir"
|
||||
@@ -65,7 +65,7 @@ patchLog4jConfig() {
|
||||
return 1
|
||||
fi
|
||||
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
|
||||
canUseRollingLogs=false
|
||||
useGeneratedLogs=false
|
||||
}
|
||||
|
||||
# Temporarily disable debugging output
|
||||
@@ -104,7 +104,8 @@ elif versionLessThan 1.18.1; then
|
||||
fi
|
||||
|
||||
# Set up log4j2 configuration with templating support
|
||||
if ${canUseRollingLogs}; then
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
if ${useGeneratedLogs}; then
|
||||
# Set up log configuration defaults
|
||||
: "${LOG_LEVEL:=info}"
|
||||
: "${ROLLING_LOG_MAX_FILES:=1000}"
|
||||
@@ -128,7 +129,6 @@ if ${canUseRollingLogs}; then
|
||||
export LOG_LEVEL ROLLING_LOG_FILE_PATTERN ROLLING_LOG_MAX_FILES
|
||||
export LOG_CONSOLE_FORMAT LOG_TERMINAL_FORMAT LOG_FILE_FORMAT
|
||||
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
|
||||
# Always regenerate if file doesn't exist
|
||||
if [ ! -e "$LOGFILE" ] || isTrue "${REGENERATE_LOG4J2:-true}"; then
|
||||
@@ -172,10 +172,8 @@ EOF
|
||||
|
||||
# Apply the log4j2 configuration
|
||||
JVM_OPTS="-Dlog4j.configurationFile=log4j2.xml ${JVM_OPTS}"
|
||||
elif isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
|
||||
# Legacy behavior: error if rolling logs explicitly requested but not possible
|
||||
logError "Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
|
||||
exit 1
|
||||
else
|
||||
rm -f "${LOGFILE}"
|
||||
fi
|
||||
|
||||
# Optional disable console
|
||||
|
||||
42
zensical.toml
Normal file
42
zensical.toml
Normal file
@@ -0,0 +1,42 @@
|
||||
[project]
|
||||
site_name = "Minecraft Server on Docker (Java Edition)"
|
||||
site_url = "https://docker-minecraft-server.readthedocs.io/en/latest/"
|
||||
site_description = "Documentation for Minecraft Server on Docker"
|
||||
repo_name = "itzg/docker-minecraft-server"
|
||||
repo_url = "https://github.com/itzg/docker-minecraft-server"
|
||||
site_author = "itzg"
|
||||
copyright = "Copyright © itzg 2026."
|
||||
docs_dir = "docs"
|
||||
site_dir = "site"
|
||||
|
||||
[project.theme]
|
||||
features = [
|
||||
"navigation.tracking",
|
||||
"navigation.tabs",
|
||||
"navigation.tabs.sticky",
|
||||
"navigation.sections",
|
||||
"navigation.expand",
|
||||
"navigation.top",
|
||||
"navigation.indexes"
|
||||
]
|
||||
language = "en"
|
||||
|
||||
[project.theme.icon]
|
||||
repo = "fontawesome/brands/github"
|
||||
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme)"
|
||||
toggle.icon = "lucide/sun-moon"
|
||||
toggle.name = "Switch to light mode"
|
||||
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme: light)"
|
||||
scheme = "default"
|
||||
toggle.icon = "lucide/sun"
|
||||
toggle.name = "Switch to dark mode"
|
||||
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme: dark)"
|
||||
scheme = "slate"
|
||||
toggle.icon = "lucide/moon"
|
||||
toggle.name = "Switch to light mode"
|
||||
Reference in New Issue
Block a user