From 82109cffa0890c2bffa9e6eccbadc1512995d2f3 Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Sat, 30 Dec 2023 16:18:36 +0800 Subject: [PATCH] more readme thing --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 913bed0..4571392 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,41 @@ Official docker images for [MCDReforged](https://github.com/Fallen-Breath/MCDReforged) -## Images +## Usages + +### Quick start + +Quick test if the docker and image works -Runtime environment: -- User: root -- Working directory: `/mcdr` +```bash +docker run -it --rm mcdreforged/mcdreforged +``` + +### Persist your server data + +For a production usage, you need to persist the working directory: `/mcdr`, +where all MCDR related files and the server folder is in + +```bash +docker run --name my_mcdr -v /path/to/my/server:/mcdr mcdreforged/mcdreforged +``` + +### Python package installation If you want to installed custom python packages, you can: -1. Mount path `/root/.local/lib/python${PYTHON_VERSION}/site-packages/` to a volume or a local directory, - where `PYTHON_VERSION` is the major + minor version of the python interpreter, e.g. `3.11` -2. Use `pip3` to install packages you want +1. Mount path `/root/.local/lib/python${PYTHON_VERSION}/site-packages/` to a volume or a local directory + - `PYTHON_VERSION` is the major + minor version of the python interpreter, e.g. `3.11` + - This step is optional. Installing without the directory mounted results in the loss of the new packages when the container is removed +2. Use `pip3` to install whatever packages you want like usual. The `--user` argument is set automatically globally + + ```bash + $ docker exec -it my_mcdr pip3 install requests + ``` + +## Images -### Base Image +### Base [![Docker](https://img.shields.io/docker/v/mcdreforged/mcdreforged/latest)](https://hub.docker.com/r/mcdreforged/mcdreforged) @@ -34,9 +56,11 @@ mcdreforged/mcdreforged:2.13.0-py3.11 mcdreforged/mcdreforged:2.13.0-py3.11-slim ``` -### Image with extra packages +### Extra + +Image with extra python packages -Extra packages are collected from the [Plugin Catalogue](https://github.com/MCDReforged/PluginCatalogue), +Theses extra packages are collected from the [Plugin Catalogue](https://github.com/MCDReforged/PluginCatalogue), covering almost all required packages of the plugins in the catalogue ```bash @@ -48,18 +72,22 @@ mcdreforged/mcdreforged-extra:2.13.0-py3.11 mcdreforged/mcdreforged-extra:2.13.0-py3.11-slim ``` -### Image with OpenJDK +### OpenJDK -Supported openjdk distributions: +Images with OpenJDK installed + +Supported OpenJDK distributions: - [corretoo](https://aws.amazon.com/corretto/) - [liberica](https://bell-sw.com/libericajdk/) - [temurin](https://adoptium.net/temurin/) - [zulu](https://www.azul.com/downloads/?package=jdk#zulu) +Supported java version: 8, 11, 17, 21 + Default JDK version: 17 -`-extra` suffix means with extra packages +`-extra` suffix means with [extra](#extra) packages ```bash mcdreforged/mcdreforged-temurin:latest