mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-18 05:03:17 +00:00
@@ -798,11 +798,21 @@ Example of expected ForgeAPI file format.
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Generic pack file
|
### Generic pack files
|
||||||
|
|
||||||
To install all of the server content (jars, mods, plugins, configs, etc) from a zip file, such as a CurseForge modpack that is missing a server start script, then set `GENERIC_PACK` to the container path of the zip file. That, combined with `TYPE`, allows for custom content along with container managed server download and install.
|
To install all of the server content (jars, mods, plugins, configs, etc) from a zip or tgz file, such as a CurseForge modpack that is missing a server start script, then set `GENERIC_PACK` to the container path or URL of the archive file.
|
||||||
|
|
||||||
If multiple generic packs need to be applied together, set `GENERIC_PACKS` instead, with a comma separated list of zip file paths and/or URLs to zip files.
|
If multiple generic packs need to be applied together, set `GENERIC_PACKS` instead, with a comma separated list of archive file paths and/or URLs to files.
|
||||||
|
|
||||||
|
To avoid repetition, each entry will be prefixed by the value of `GENERIC_PACKS_PREFIX` and suffixed by the value of `GENERIC_PACKS_SUFFIX`, both of which are optional. For example, the following variables
|
||||||
|
|
||||||
|
```
|
||||||
|
GENERIC_PACKS=configs-v9.0.1,mods-v4.3.6
|
||||||
|
GENERIC_PACKS_PREFIX=https://cdn.example.org/
|
||||||
|
GENERIC_PACKS_SUFFIX=.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
would expand to `https://cdn.example.org/configs-v9.0.1.zip,https://cdn.example.org/mods-v4.3.6.zip`.
|
||||||
|
|
||||||
### Mod/Plugin URL Listing File
|
### Mod/Plugin URL Listing File
|
||||||
|
|
||||||
|
|||||||
@@ -188,13 +188,16 @@ esac
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
: "${GENERIC_PACKS:=${GENERIC_PACK}}"
|
: "${GENERIC_PACKS:=${GENERIC_PACK}}"
|
||||||
|
: "${GENERIC_PACKS_PREFIX:=}"
|
||||||
|
: "${GENERIC_PACKS_SUFFIX:=}"
|
||||||
|
|
||||||
if [[ "${GENERIC_PACKS}" ]]; then
|
if [[ "${GENERIC_PACKS}" ]]; then
|
||||||
IFS=',' read -ra packs <<< "${GENERIC_PACKS}"
|
IFS=',' read -ra packs <<< "${GENERIC_PACKS}"
|
||||||
|
|
||||||
packFiles=()
|
packFiles=()
|
||||||
for pack in "${packs[@]}"; do
|
for packEntry in "${packs[@]}"; do
|
||||||
if isURL "$pack"; then
|
pack="${GENERIC_PACKS_PREFIX}${packEntry}${GENERIC_PACKS_SUFFIX}"
|
||||||
|
if isURL "${pack}"; then
|
||||||
mkdir -p /data/packs
|
mkdir -p /data/packs
|
||||||
if ! outfile=$(get -o /data/packs --output-filename --skip-existing "$pack"); then
|
if ! outfile=$(get -o /data/packs --output-filename --skip-existing "$pack"); then
|
||||||
log "ERROR: failed to download $pack"
|
log "ERROR: failed to download $pack"
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
SETUP_ONLY: "TRUE"
|
||||||
|
GENERIC_PACKS: testing
|
||||||
|
GENERIC_PACKS_PREFIX: /packs/
|
||||||
|
GENERIC_PACKS_SUFFIX: .zip
|
||||||
|
volumes:
|
||||||
|
- ./packs:/packs
|
||||||
|
- ./data:/data
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
mc-image-helper assert fileExists one.txt mods/two.txt
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
web:
|
||||||
|
image: nginx
|
||||||
|
volumes:
|
||||||
|
- ./web:/usr/share/nginx/html
|
||||||
mc:
|
mc:
|
||||||
|
depends_on:
|
||||||
|
- web
|
||||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
environment:
|
environment:
|
||||||
EULA: "true"
|
EULA: "true"
|
||||||
SETUP_ONLY: "TRUE"
|
SETUP_ONLY: "TRUE"
|
||||||
GENERIC_PACKS: https://github.com/itzg/mc-image-helper/releases/download/v1.9.5/mc-image-helper-1.9.5.zip,/packs/testing.zip
|
GENERIC_PACKS: http://web/configs.zip,/packs/testing.zip
|
||||||
volumes:
|
volumes:
|
||||||
- ./packs:/packs
|
- ./packs:/packs
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
mc-image-helper assert fileExists one.txt mods/two.txt
|
mc-image-helper assert fileExists one.txt mods/two.txt
|
||||||
|
mc-image-helper assert fileExists one.txt config/opt.yml
|
||||||
Binary file not shown.
Reference in New Issue
Block a user