Skip to content

Conversation

@Stealthii
Copy link
Contributor

See https://packwiz.infra.link/ for packwiz information

This PR adds support for packwiz server modpack definitions provided via the PACKWIZ_URL environment variable.

Packwiz modpack definitions are processed before other mod definitions (MODPACK, MODS, etc.) to allow for additional processing/overrides the operator may want to perform (in case of mods not available via Modrinth/CurseForge, or where the pack is not maintained by the operator).

We attempt to retrieve the latest bootstrap jar from Github if it doesn't already exist. If for any reason retrieving release information from Github isn't possible, we'll use the existing bootstrap jar if already available.

Packwiz is pre-configured to show no GUI and only download server mods. A relevant note to README.md has been added to clarify this, and informs operators to check their packwiz definition is correct in case client mods are downloaded and cause such issues.

@Stealthii
Copy link
Contributor Author

This is a working PR, and still needs testing.

@Stealthii
Copy link
Contributor Author

Tested PR build with the following options:

docker run --rm -it -v $(PWD)/temp:/data \
    -e 'TYPE=FABRIC' \
    -e 'EULA=TRUE' \
    -e 'PACKWIZ_URL=https://pepsidogs.github.io/pepsipack/pack.toml' \
    docker.io/itzg/minecraft-server:test-itzg-1545903355

First run successful:

[init] Changing ownership of /data to 1000 ...
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 2 1000 1000 64 Dec  6 18:10 /data'
[init] Resolved version given LATEST into 1.18
[init] Resolving type given FABRIC
[init] Checking Fabric version information.
[init] Checking Fabric Loader version information.
[init] Downloading https://maven.fabricmc.net/net/fabricmc/fabric-installer/0.10.2/fabric-installer-0.10.2.jar ...
[init] Installing Fabric 1.18 using fabric-installer-0.10.2.jar with loader version 0.12.8
Loading Fabric Installer: 0.10.2
Installing Fabric Loader 0.12.8(1.18) on the server
Downloading required files
Downloading library net.fabricmc:tiny-mappings-parser:0.3.0+build.17
Downloading library net.fabricmc:sponge-mixin:0.10.7+mixin.0.8.4
Downloading library net.fabricmc:tiny-remapper:0.6.0
Downloading library net.fabricmc:access-widener:2.0.1
Downloading library org.ow2.asm:asm:9.2
Downloading library org.ow2.asm:asm-analysis:9.2
Downloading library org.ow2.asm:asm-commons:9.2
Downloading library org.ow2.asm:asm-tree:9.2
Downloading library org.ow2.asm:asm-util:9.2
Downloading library net.fabricmc:intermediary:1.18
Downloading library net.fabricmc:fabric-loader:0.12.8
Generating server launch JAR
Downloading Minecraft server
Done
Done, start server by running fabric-server-launch.jar
[init] Downloading Packwiz v0.0.3
[init] Running packwiz against URL: https://pepsidogs.github.io/pepsipack/pack.toml
Current version is: null
New version is: v0.3.2
Attempting to update...
Update successful!
Loading manifest file...
Loading pack file...
Checking local files...
Modpack name: Pepsi Dogs
Checking local files...
Comparing new files...
Side changed, invalidating all mods
[Warning] Accepting option Beenfo as option choosing is not implemented in the CLI
(1/26) Downloaded AdvancementInfo
(2/26) Downloaded AntiGhost
(3/26) Downloaded Better Mount HUD
(4/26) Downloaded Clear Despawn (Fabric)
(5/26) Downloaded ClickThrough
(6/26) Downloaded Cloth Config API (Fabric)
(7/26) Downloaded EasierVillagerTrading
(8/26) Downloaded Giselbaer's Durability Viewer
(9/26) Downloaded Indium
(10/26) Downloaded Iris Shaders
(11/26) Downloaded Item Scroller
(12/26) Downloaded Light Overlay (Rift/Forge/Fabric)
(13/26) Downloaded Litematica
(14/26) Downloaded MaLiLib
(15/26) Downloaded Mod Menu
(16/26) Downloaded Simple Discord RPC [Forge/Fabric]
(17/26) Downloaded Smooth Boot (Fabric)
(18/26) Downloaded Sodium
(19/26) Downloaded Your Options Shall Be Respected (YOSBR)
(20/26) Downloaded Lithium
(21/26) Downloaded LazyDFU
(22/26) Downloaded Beenfo
(23/26) Downloaded Architectury API (Fabric)
(24/26) Downloaded Fabric API
(25/26) Downloaded Carpet
(26/26) Downloaded Simple Voice Chat
Finished successfully!
[init] Creating server.properties in /data/server.properties
[init] Disabling whitelist
[init] Setting whitelist to 'false' in /data/server.properties
[init] Setting white-list to 'false' in /data/server.properties
[init] Setting enable-rcon to 'true' in /data/server.properties
[init] Setting rcon.password to 'minecraft' in /data/server.properties
[init] Setting rcon.port to '25575' in /data/server.properties
[init] Setting motd to 'A Fabric Minecraft Server powered by Docker' in /data/server.properties
[init] Checking for JSON files.
[init] Setting initial memory to 1G and max to 1G
[init] Starting the Minecraft server...
Unpacking 1.18/server-1.18.jar (versions:1.18) to versions/1.18/server-1.18.jar
Unpacking com/github/oshi/oshi-core/5.8.2/oshi-core-5.8.2.jar (libraries:com.github.oshi:oshi-core:5.8.2) to libraries/com/github/oshi/oshi-core/5.8.2/oshi-core-5.8.2.jar
Unpacking com/google/code/gson/gson/2.8.8/gson-2.8.8.jar (libraries:com.google.code.gson:gson:2.8.8) to libraries/com/google/code/gson/gson/2.8.8/gson-2.8.8.jar
Unpacking com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar (libraries:com.google.guava:failureaccess:1.0.1) to libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
Unpacking com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar (libraries:com.google.guava:guava:31.0.1-jre) to libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar
Unpacking com/mojang/authlib/3.2.38/authlib-3.2.38.jar (libraries:com.mojang:authlib:3.2.38) to libraries/com/mojang/authlib/3.2.38/authlib-3.2.38.jar
Unpacking com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar (libraries:com.mojang:brigadier:1.0.18) to libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar
Unpacking com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar (libraries:com.mojang:datafixerupper:4.0.26) to libraries/com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar
Unpacking com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar (libraries:com.mojang:javabridge:1.2.24) to libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar
Unpacking commons-io/commons-io/2.11.0/commons-io-2.11.0.jar (libraries:commons-io:commons-io:2.11.0) to libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
Unpacking io/netty/netty-all/4.1.68.Final/netty-all-4.1.68.Final.jar (libraries:io.netty:netty-all:4.1.68.Final) to libraries/io/netty/netty-all/4.1.68.Final/netty-all-4.1.68.Final.jar
Unpacking it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar (libraries:it.unimi.dsi:fastutil:8.5.6) to libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar
Unpacking net/java/dev/jna/jna/5.9.0/jna-5.9.0.jar (libraries:net.java.dev.jna:jna:5.9.0) to libraries/net/java/dev/jna/jna/5.9.0/jna-5.9.0.jar
Unpacking net/java/dev/jna/jna-platform/5.9.0/jna-platform-5.9.0.jar (libraries:net.java.dev.jna:jna-platform:5.9.0) to libraries/net/java/dev/jna/jna-platform/5.9.0/jna-platform-5.9.0.jar
Unpacking net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar (libraries:net.sf.jopt-simple:jopt-simple:5.0.4) to libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar
Unpacking org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar (libraries:org.apache.commons:commons-lang3:3.12.0) to libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
Unpacking org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar (libraries:org.apache.logging.log4j:log4j-api:2.14.1) to libraries/org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar
Unpacking org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.jar (libraries:org.apache.logging.log4j:log4j-core:2.14.1) to libraries/org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.jar
Unpacking org/apache/logging/log4j/log4j-slf4j18-impl/2.14.1/log4j-slf4j18-impl-2.14.1.jar (libraries:org.apache.logging.log4j:log4j-slf4j18-impl:2.14.1) to libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.14.1/log4j-slf4j18-impl-2.14.1.jar
Unpacking org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar (libraries:org.slf4j:slf4j-api:1.8.0-beta4) to libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar
Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[18:11:08] [INFO] [FabricLoader/GameProvider]: Loading for game Minecraft 1.18
[18:11:08] [INFO] [FabricLoader/GameRemap]: Fabric is preparing JARs on first launch, this may take a few seconds...
[18:11:15] [main/INFO]: Loading for game Minecraft 1.18
[18:11:15] [main/INFO]: Fabric is preparing JARs on first launch, this may take a few seconds...
[18:11:15] [main/WARN]: Warnings were found!
 - Mod 'Beenfo' (beenfo) 1.18-fabric0.43.1-1.3.3 recommends any version of modmenu, which is missing!
	 - You should install any version of modmenu for the optimal experience.
 - Mod 'Fabric Rendering Fluids (v1)' (fabric-rendering-fluids-v1) 0.1.18+3ac43d95c8 recommends any version of fabric-textures-v0, which is disabled for this environment (client/server only)!
	 - You should install any version of fabric-textures-v0 for the optimal experience.
[18:11:15] [main/INFO]: Loading 44 mods:
	- architectury 3.1.45
	- beenfo 1.18-fabric0.43.1-1.3.3
	- carpet 1.4.56
	- crowdin-translate 1.4+1.18 via beenfo
	- fabric 0.44.0+1.18
	- fabric-api-base 0.4.1+b4f4f6cdc8 via fabric
	- fabric-api-lookup-api-v1 1.4.0+16d92c47c8 via fabric
	- fabric-biome-api-v1 6.0.1+ded849a9c8 via fabric
	- fabric-command-api-v1 1.1.6+3ac43d95c8 via fabric
	- fabric-commands-v0 0.2.5+b4f4f6cdc8 via fabric
	- fabric-containers-v0 0.1.18+d154e2c6c8 via fabric
	- fabric-content-registries-v0 0.4.5+6f53a73dc8 via fabric
	- fabric-crash-report-info-v1 0.1.8+3ac43d95c8 via fabric
	- fabric-dimensions-v1 2.1.7+43d29571c8 via fabric
	- fabric-entity-events-v1 1.4.5+6b21378ac8 via fabric
	- fabric-events-interaction-v0 0.4.16+bfa23f17c8 via fabric
	- fabric-events-lifecycle-v0 0.2.6+b4f4f6cdc8 via fabric
	- fabric-game-rule-api-v1 1.0.10+3ac43d95c8 via fabric
	- fabric-item-api-v1 1.3.0+691a79b5c8 via fabric
	- fabric-item-groups-v0 0.3.3+3ac43d95c8 via fabric
	- fabric-lifecycle-events-v1 1.4.10+c15ca335c8 via fabric
	- fabric-loot-tables-v1 1.0.8+3ac43d95c8 via fabric
	- fabric-mining-level-api-v1 1.0.3+3ac43d95c8 via fabric
	- fabric-mining-levels-v0 0.1.7+b4f4f6cdc8 via fabric
	- fabric-networking-api-v1 1.0.18+3ac43d95c8 via fabric
	- fabric-networking-v0 0.3.5+b4f4f6cdc8 via fabric
	- fabric-object-builder-api-v1 1.11.0+3b82842ec8 via fabric
	- fabric-object-builders-v0 0.7.8+3ac43d95c8 via fabric
	- fabric-particles-v1 0.2.9+526dc1acc8 via fabric
	- fabric-registry-sync-v0 0.8.5+3ac43d95c8 via fabric
	- fabric-rendering-data-attachment-v1 0.3.4+7242e9d7c8 via fabric
	- fabric-rendering-fluids-v1 0.1.18+3ac43d95c8 via fabric
	- fabric-resource-loader-v0 0.4.11+3ac43d95c8 via fabric
	- fabric-screen-handler-api-v1 1.1.11+3ac43d95c8 via fabric
	- fabric-structure-api-v1 2.0.8+295197a7c8 via fabric
	- fabric-tag-extensions-v0 1.2.5+3ac43d95c8 via fabric
	- fabric-tool-attribute-api-v1 1.3.4+7de09f55c8 via fabric
	- fabric-transfer-api-v1 1.5.5+b4f4f6cdc8 via fabric
	- fabricloader 0.12.8
	- java 17
	- lazydfu 0.1.2
	- lithium 0.7.6-rc1
	- minecraft 1.18
	- voicechat 1.18-2.1.21
[18:11:16] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/data/libraries/net/fabricmc/sponge-mixin/0.10.7+mixin.0.8.4/sponge-mixin-0.10.7+mixin.0.8.4.jar Service=Knot/Fabric Env=SERVER
[18:11:16] [main/INFO]: Compatibility level set to JAVA_16
[18:11:16] [main/INFO]: Loaded configuration file for Lithium: 86 options available, 0 override(s) found
[18:11:22] [main/WARN]: @Inject(@At("INVOKE")) Shift.BY=3 on fabric-lifecycle-events-v1.mixins.json:server.WorldChunkMixin::handler$zmk000$onLoadBlockEntity exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning.
[18:11:23] [main/INFO]: Compatibility version 12
[18:11:23] [main/INFO]: Loading plugins
[18:11:23] [main/INFO]: Loaded 0 plugin(s)
[18:11:23] [main/INFO]: Initializing plugins
[18:11:23] [main/INFO]: Initialized 0 plugin(s)
[18:11:24] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[18:11:25] [main/INFO]: Found new data pack Fabric Mods, loading it automatically
[18:11:25] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:11:25] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:11:25] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:11:25] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:11:25] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:11:25] [main/INFO]: Reloading ResourceManager: Default, Fabric Mods (Fabric Tool Attribute API (v1))
[18:11:25] [Worker-Main-6/INFO]: Loaded 7 recipes
[18:11:26] [Worker-Main-6/INFO]: Loaded 1141 advancements
[18:11:26] [main/INFO]: Applied 0 biome modifications to 0 of 61 new biomes in 1.780 ms
[18:11:27] [Server thread/INFO]: Starting minecraft server version 1.18
[18:11:27] [Server thread/INFO]: Loading properties
[18:11:27] [Server thread/INFO]: Default game type: SURVIVAL
[18:11:27] [Server thread/INFO]: Generating keypair
[18:11:27] [Server thread/INFO]: Starting Minecraft server on *:25565
[18:11:27] [Server thread/INFO]: Using epoll channel type
[18:11:27] [Server thread/INFO]: Preparing level "world"
[18:11:32] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[18:11:32] [Worker-Main-4/INFO]: Preparing spawn area: 0%
[18:11:32] [Worker-Main-5/INFO]: Preparing spawn area: 0%
[18:11:33] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[18:11:33] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[18:11:34] [Worker-Main-7/INFO]: Preparing spawn area: 0%
[18:11:34] [Worker-Main-7/INFO]: Preparing spawn area: 0%
[18:11:35] [Worker-Main-6/INFO]: Preparing spawn area: 0%
[18:11:35] [Worker-Main-2/INFO]: Preparing spawn area: 1%
[18:11:36] [Worker-Main-5/INFO]: Preparing spawn area: 2%
[18:11:36] [Worker-Main-3/INFO]: Preparing spawn area: 3%
[18:11:37] [Worker-Main-6/INFO]: Preparing spawn area: 4%
[18:11:37] [Worker-Main-6/INFO]: Preparing spawn area: 5%
[18:11:38] [Worker-Main-6/INFO]: Preparing spawn area: 7%
[18:11:38] [Worker-Main-7/INFO]: Preparing spawn area: 9%
[18:11:39] [Worker-Main-3/INFO]: Preparing spawn area: 10%
[18:11:39] [Worker-Main-4/INFO]: Preparing spawn area: 11%
[18:11:40] [Worker-Main-1/INFO]: Preparing spawn area: 13%
[18:11:40] [Worker-Main-7/INFO]: Preparing spawn area: 14%
[18:11:41] [Worker-Main-7/INFO]: Preparing spawn area: 14%
[18:11:41] [Worker-Main-1/INFO]: Preparing spawn area: 15%
[18:11:42] [Worker-Main-2/INFO]: Preparing spawn area: 15%
[18:11:42] [Worker-Main-3/INFO]: Preparing spawn area: 17%
[18:11:43] [Worker-Main-3/INFO]: Preparing spawn area: 20%
[18:11:43] [Worker-Main-1/INFO]: Preparing spawn area: 23%
[18:11:44] [Worker-Main-6/INFO]: Preparing spawn area: 25%
[18:11:44] [Worker-Main-6/INFO]: Preparing spawn area: 27%
[18:11:45] [Worker-Main-6/INFO]: Preparing spawn area: 30%
[18:11:45] [Worker-Main-4/INFO]: Preparing spawn area: 32%
[18:11:46] [Worker-Main-1/INFO]: Preparing spawn area: 34%
[18:11:46] [Worker-Main-6/INFO]: Preparing spawn area: 36%
[18:11:47] [Worker-Main-6/INFO]: Preparing spawn area: 38%
[18:11:47] [Worker-Main-3/INFO]: Preparing spawn area: 41%
[18:11:48] [Worker-Main-7/INFO]: Preparing spawn area: 42%
[18:11:48] [Worker-Main-1/INFO]: Preparing spawn area: 45%
[18:11:49] [Worker-Main-5/INFO]: Preparing spawn area: 48%
[18:11:49] [Worker-Main-6/INFO]: Preparing spawn area: 51%
[18:11:50] [Worker-Main-1/INFO]: Preparing spawn area: 54%
[18:11:50] [Worker-Main-4/INFO]: Preparing spawn area: 56%
[18:11:51] [Worker-Main-6/INFO]: Preparing spawn area: 59%
[18:11:51] [Worker-Main-5/INFO]: Preparing spawn area: 62%
[18:11:52] [Worker-Main-1/INFO]: Preparing spawn area: 65%
[18:11:52] [Worker-Main-1/INFO]: Preparing spawn area: 68%
[18:11:53] [Worker-Main-6/INFO]: Preparing spawn area: 73%
[18:11:53] [Worker-Main-2/INFO]: Preparing spawn area: 75%
[18:11:54] [Worker-Main-4/INFO]: Preparing spawn area: 76%
[18:11:54] [Worker-Main-3/INFO]: Preparing spawn area: 80%
[18:11:55] [Worker-Main-3/INFO]: Preparing spawn area: 84%
[18:11:55] [Worker-Main-5/INFO]: Preparing spawn area: 86%
[18:11:56] [Worker-Main-1/INFO]: Preparing spawn area: 89%
[18:11:56] [Worker-Main-3/INFO]: Preparing spawn area: 93%
[18:11:57] [Worker-Main-6/INFO]: Preparing spawn area: 97%
[18:11:57] [Server thread/INFO]: Time elapsed: 25381 ms
[18:11:57] [Server thread/INFO]: Done (29.607s)! For help, type "help"
[18:11:57] [Server thread/INFO]: Starting remote control listener
[18:11:57] [Server thread/INFO]: Thread RCON Listener started
[18:11:57] [Server thread/INFO]: RCON running on 0.0.0.0:25575
[18:11:57] [Server thread/INFO]: Using default voicechat socket implementation
[18:11:57] [VoiceChatServerThread/INFO]: Server started at port 24454

Second run successful:

[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 24 1000 1000 768 Dec  6 18:11 /data'
[init] Resolved version given LATEST into 1.18
[init] Resolving type given FABRIC
[init] Running packwiz against URL: https://pepsidogs.github.io/pepsipack/pack.toml
Current version is: v0.3.2
New version is: v0.3.2
Already up to date!
Loading manifest file...
Loading pack file...
Checking local files...
Modpack is already up to date!
Finished successfully!
[init] server.properties already created, skipping
[init] Checking for JSON files.
[init] Setting initial memory to 1G and max to 1G
[init] Starting the Minecraft server...
Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[18:13:07] [INFO] [FabricLoader/GameProvider]: Loading for game Minecraft 1.18
[18:13:08] [main/INFO]: Loading for game Minecraft 1.18
[18:13:08] [main/WARN]: Warnings were found!
 - Mod 'Beenfo' (beenfo) 1.18-fabric0.43.1-1.3.3 recommends any version of modmenu, which is missing!
	 - You should install any version of modmenu for the optimal experience.
 - Mod 'Fabric Rendering Fluids (v1)' (fabric-rendering-fluids-v1) 0.1.18+3ac43d95c8 recommends any version of fabric-textures-v0, which is disabled for this environment (client/server only)!
	 - You should install any version of fabric-textures-v0 for the optimal experience.
[18:13:08] [main/INFO]: Loading 44 mods:
	- architectury 3.1.45
	- beenfo 1.18-fabric0.43.1-1.3.3
	- carpet 1.4.56
	- crowdin-translate 1.4+1.18 via beenfo
	- fabric 0.44.0+1.18
	- fabric-api-base 0.4.1+b4f4f6cdc8 via fabric
	- fabric-api-lookup-api-v1 1.4.0+16d92c47c8 via fabric
	- fabric-biome-api-v1 6.0.1+ded849a9c8 via fabric
	- fabric-command-api-v1 1.1.6+3ac43d95c8 via fabric
	- fabric-commands-v0 0.2.5+b4f4f6cdc8 via fabric
	- fabric-containers-v0 0.1.18+d154e2c6c8 via fabric
	- fabric-content-registries-v0 0.4.5+6f53a73dc8 via fabric
	- fabric-crash-report-info-v1 0.1.8+3ac43d95c8 via fabric
	- fabric-dimensions-v1 2.1.7+43d29571c8 via fabric
	- fabric-entity-events-v1 1.4.5+6b21378ac8 via fabric
	- fabric-events-interaction-v0 0.4.16+bfa23f17c8 via fabric
	- fabric-events-lifecycle-v0 0.2.6+b4f4f6cdc8 via fabric
	- fabric-game-rule-api-v1 1.0.10+3ac43d95c8 via fabric
	- fabric-item-api-v1 1.3.0+691a79b5c8 via fabric
	- fabric-item-groups-v0 0.3.3+3ac43d95c8 via fabric
	- fabric-lifecycle-events-v1 1.4.10+c15ca335c8 via fabric
	- fabric-loot-tables-v1 1.0.8+3ac43d95c8 via fabric
	- fabric-mining-level-api-v1 1.0.3+3ac43d95c8 via fabric
	- fabric-mining-levels-v0 0.1.7+b4f4f6cdc8 via fabric
	- fabric-networking-api-v1 1.0.18+3ac43d95c8 via fabric
	- fabric-networking-v0 0.3.5+b4f4f6cdc8 via fabric
	- fabric-object-builder-api-v1 1.11.0+3b82842ec8 via fabric
	- fabric-object-builders-v0 0.7.8+3ac43d95c8 via fabric
	- fabric-particles-v1 0.2.9+526dc1acc8 via fabric
	- fabric-registry-sync-v0 0.8.5+3ac43d95c8 via fabric
	- fabric-rendering-data-attachment-v1 0.3.4+7242e9d7c8 via fabric
	- fabric-rendering-fluids-v1 0.1.18+3ac43d95c8 via fabric
	- fabric-resource-loader-v0 0.4.11+3ac43d95c8 via fabric
	- fabric-screen-handler-api-v1 1.1.11+3ac43d95c8 via fabric
	- fabric-structure-api-v1 2.0.8+295197a7c8 via fabric
	- fabric-tag-extensions-v0 1.2.5+3ac43d95c8 via fabric
	- fabric-tool-attribute-api-v1 1.3.4+7de09f55c8 via fabric
	- fabric-transfer-api-v1 1.5.5+b4f4f6cdc8 via fabric
	- fabricloader 0.12.8
	- java 17
	- lazydfu 0.1.2
	- lithium 0.7.6-rc1
	- minecraft 1.18
	- voicechat 1.18-2.1.21
[18:13:09] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/data/libraries/net/fabricmc/sponge-mixin/0.10.7+mixin.0.8.4/sponge-mixin-0.10.7+mixin.0.8.4.jar Service=Knot/Fabric Env=SERVER
[18:13:09] [main/INFO]: Compatibility level set to JAVA_16
[18:13:09] [main/INFO]: Loaded configuration file for Lithium: 86 options available, 0 override(s) found
[18:13:14] [main/WARN]: @Inject(@At("INVOKE")) Shift.BY=3 on fabric-lifecycle-events-v1.mixins.json:server.WorldChunkMixin::handler$zmk000$onLoadBlockEntity exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning.
[18:13:15] [main/INFO]: Compatibility version 12
[18:13:15] [main/INFO]: Loading plugins
[18:13:15] [main/INFO]: Loaded 0 plugin(s)
[18:13:15] [main/INFO]: Initializing plugins
[18:13:15] [main/INFO]: Initialized 0 plugin(s)
[18:13:16] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[18:13:16] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:13:16] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:13:16] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:13:16] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:13:16] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:13:16] [main/INFO]: Reloading ResourceManager: Default, Fabric Mods (Fabric Tool Attribute API (v1))
[18:13:17] [Worker-Main-4/INFO]: Loaded 7 recipes
[18:13:17] [Worker-Main-4/INFO]: Loaded 1141 advancements
[18:13:18] [main/INFO]: Applied 0 biome modifications to 0 of 61 new biomes in 1.942 ms
[18:13:18] [Server thread/INFO]: Starting minecraft server version 1.18
[18:13:18] [Server thread/INFO]: Loading properties
[18:13:18] [Server thread/INFO]: Default game type: SURVIVAL
[18:13:18] [Server thread/INFO]: Generating keypair
[18:13:18] [Server thread/INFO]: Starting Minecraft server on *:25565
[18:13:18] [Server thread/INFO]: Using epoll channel type
[18:13:18] [Server thread/INFO]: Preparing level "world"
[18:13:20] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[18:13:20] [Server thread/INFO]: Preparing spawn area: 0%
[18:13:23] [Worker-Main-6/INFO]: Preparing spawn area: 94%
[18:13:23] [Worker-Main-6/INFO]: Preparing spawn area: 94%
[18:13:23] [Worker-Main-6/INFO]: Preparing spawn area: 94%
[18:13:23] [Worker-Main-4/INFO]: Preparing spawn area: 94%
[18:13:23] [Worker-Main-2/INFO]: Preparing spawn area: 94%
[18:13:23] [Server thread/INFO]: Time elapsed: 2724 ms
[18:13:23] [Server thread/INFO]: Done (4.850s)! For help, type "help"
[18:13:23] [Server thread/INFO]: Starting remote control listener
[18:13:23] [Server thread/INFO]: Thread RCON Listener started
[18:13:23] [Server thread/INFO]: RCON running on 0.0.0.0:25575
[18:13:23] [Server thread/INFO]: Using default voicechat socket implementation
[18:13:23] [VoiceChatServerThread/INFO]: Server started at port 24454

@Stealthii
Copy link
Contributor Author

Tested overriding pack definitions (and adding additional mods) using the common MODPACK env var:

docker run --rm -it -v $(PWD)/temp:/data \
    -e 'TYPE=FABRIC' \
    -e 'EULA=TRUE' \
    -e 'PACKWIZ_URL=https://pepsidogs.github.io/pepsipack/pack.toml' \
    -e 'MODPACK=https://pepsi.dog/minecraft/files/mods_v1.zip' \
    docker.io/itzg/minecraft-server:test-itzg-1545903355

Successful:

[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 24 1000 1000 768 Dec  6 18:11 /data'
[init] Resolved version given LATEST into 1.18
[init] Resolving type given FABRIC
[init] Running packwiz against URL: https://pepsidogs.github.io/pepsipack/pack.toml
Current version is: v0.3.2
New version is: v0.3.2
Already up to date!
Loading manifest file...
Loading pack file...
Checking local files...
Modpack is already up to date!
Finished successfully!
[init] Downloading mod/plugin pack
Archive:  /tmp/modpack.zip
  inflating: /data/mods/beenfo-1.18-fabric0.43.1-1.3.3.jar
  inflating: /data/mods/fabric-api-0.43.1+1.18.jar
  inflating: /data/mods/fabric-carpet-1.18-1.4.56+v211130.jar
  inflating: /data/mods/lazydfu-0.1.2.jar
  inflating: /data/mods/lithium-fabric-mc1.18-0.7.6-SNAPSHOT.jar
  inflating: /data/mods/OpenLoader-fabric-1.18-3.0.0.jar
  inflating: /data/mods/starlight-1.0.0+fabric.d8507e3.jar
  inflating: /data/mods/voicechat-fabric-1.18-2.1.17.jar
[init] server.properties already created, skipping
[init] Checking for JSON files.
[init] Setting initial memory to 1G and max to 1G
[init] Starting the Minecraft server...
Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[18:16:51] [INFO] [FabricLoader/GameProvider]: Loading for game Minecraft 1.18
[18:16:52] [main/INFO]: Loading for game Minecraft 1.18
[18:16:52] [main/WARN]: Warnings were found!
 - Mod 'Beenfo' (beenfo) 1.18-fabric0.43.1-1.3.3 recommends any version of modmenu, which is missing!
	 - You should install any version of modmenu for the optimal experience.
 - Mod 'Fabric Rendering Fluids (v1)' (fabric-rendering-fluids-v1) 0.1.18+3ac43d95c8 recommends any version of fabric-textures-v0, which is disabled for this environment (client/server only)!
	 - You should install any version of fabric-textures-v0 for the optimal experience.
[18:16:52] [main/INFO]: Loading 46 mods:
	- architectury 3.1.45
	- beenfo 1.18-fabric0.43.1-1.3.3
	- carpet 1.4.56
	- crowdin-translate 1.4+1.18 via beenfo
	- fabric 0.44.0+1.18
	- fabric-api-base 0.4.1+b4f4f6cdc8 via fabric
	- fabric-api-lookup-api-v1 1.4.0+16d92c47c8 via fabric
	- fabric-biome-api-v1 6.0.1+ded849a9c8 via fabric
	- fabric-command-api-v1 1.1.6+3ac43d95c8 via fabric
	- fabric-commands-v0 0.2.5+b4f4f6cdc8 via fabric
	- fabric-containers-v0 0.1.18+d154e2c6c8 via fabric
	- fabric-content-registries-v0 0.4.5+6f53a73dc8 via fabric
	- fabric-crash-report-info-v1 0.1.8+3ac43d95c8 via fabric
	- fabric-dimensions-v1 2.1.7+43d29571c8 via fabric
	- fabric-entity-events-v1 1.4.5+6b21378ac8 via fabric
	- fabric-events-interaction-v0 0.4.16+bfa23f17c8 via fabric
	- fabric-events-lifecycle-v0 0.2.6+b4f4f6cdc8 via fabric
	- fabric-game-rule-api-v1 1.0.10+3ac43d95c8 via fabric
	- fabric-item-api-v1 1.3.0+691a79b5c8 via fabric
	- fabric-item-groups-v0 0.3.3+3ac43d95c8 via fabric
	- fabric-lifecycle-events-v1 1.4.10+c15ca335c8 via fabric
	- fabric-loot-tables-v1 1.0.8+3ac43d95c8 via fabric
	- fabric-mining-level-api-v1 1.0.3+3ac43d95c8 via fabric
	- fabric-mining-levels-v0 0.1.7+b4f4f6cdc8 via fabric
	- fabric-networking-api-v1 1.0.18+3ac43d95c8 via fabric
	- fabric-networking-v0 0.3.5+b4f4f6cdc8 via fabric
	- fabric-object-builder-api-v1 1.11.0+3b82842ec8 via fabric
	- fabric-object-builders-v0 0.7.8+3ac43d95c8 via fabric
	- fabric-particles-v1 0.2.9+526dc1acc8 via fabric
	- fabric-registry-sync-v0 0.8.5+3ac43d95c8 via fabric
	- fabric-rendering-data-attachment-v1 0.3.4+7242e9d7c8 via fabric
	- fabric-rendering-fluids-v1 0.1.18+3ac43d95c8 via fabric
	- fabric-resource-loader-v0 0.4.11+3ac43d95c8 via fabric
	- fabric-screen-handler-api-v1 1.1.11+3ac43d95c8 via fabric
	- fabric-structure-api-v1 2.0.8+295197a7c8 via fabric
	- fabric-tag-extensions-v0 1.2.5+3ac43d95c8 via fabric
	- fabric-tool-attribute-api-v1 1.3.4+7de09f55c8 via fabric
	- fabric-transfer-api-v1 1.5.5+b4f4f6cdc8 via fabric
	- fabricloader 0.12.8
	- java 17
	- lazydfu 0.1.2
	- lithium 0.7.6-rc1
	- minecraft 1.18
	- openloader 3.0.0
	- starlight 1.0.0+fabric.d8507e3
	- voicechat 1.18-2.1.21
[18:16:52] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/data/libraries/net/fabricmc/sponge-mixin/0.10.7+mixin.0.8.4/sponge-mixin-0.10.7+mixin.0.8.4.jar Service=Knot/Fabric Env=SERVER
[18:16:52] [main/INFO]: Compatibility level set to JAVA_16
[18:16:53] [main/INFO]: Loaded configuration file for Lithium: 86 options available, 0 override(s) found
[18:16:58] [main/WARN]: @Inject(@At("INVOKE")) Shift.BY=3 on fabric-lifecycle-events-v1.mixins.json:server.WorldChunkMixin::handler$zmk000$onLoadBlockEntity exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning.
[18:16:59] [main/INFO]: Compatibility version 12
[18:16:59] [main/INFO]: Loading plugins
[18:16:59] [main/INFO]: Loaded 0 plugin(s)
[18:16:59] [main/INFO]: Initializing plugins
[18:16:59] [main/INFO]: Initialized 0 plugin(s)
[18:16:59] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[18:16:59] [main/INFO]: Injecting datapack provider for server.
[18:17:00] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:17:00] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:17:00] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:17:00] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:17:00] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:17:00] [main/INFO]: Reloading ResourceManager: Default, Fabric Mods (Fabric Tool Attribute API (v1))
[18:17:00] [Worker-Main-4/INFO]: Loaded 7 recipes
[18:17:01] [Worker-Main-4/INFO]: Loaded 1141 advancements
[18:17:01] [main/INFO]: Applied 0 biome modifications to 0 of 61 new biomes in 1.714 ms
[18:17:02] [Server thread/INFO]: Starting minecraft server version 1.18
[18:17:02] [Server thread/INFO]: Loading properties
[18:17:02] [Server thread/INFO]: Default game type: SURVIVAL
[18:17:02] [Server thread/INFO]: Generating keypair
[18:17:02] [Server thread/INFO]: Starting Minecraft server on *:25565
[18:17:02] [Server thread/INFO]: Using epoll channel type
[18:17:02] [Server thread/INFO]: Preparing level "world"
[18:17:04] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[18:17:04] [Server thread/INFO]: Preparing spawn area: 0%
[18:17:05] [Worker-Main-4/INFO]: Preparing spawn area: 17%
[18:17:05] [Worker-Main-2/INFO]: Preparing spawn area: 17%
[18:17:07] [Worker-Main-6/INFO]: Preparing spawn area: 17%
[18:17:07] [Worker-Main-6/INFO]: Preparing spawn area: 17%
[18:17:07] [Worker-Main-6/INFO]: Preparing spawn area: 17%
[18:17:07] [Worker-Main-6/INFO]: Preparing spawn area: 17%
[18:17:07] [Server thread/INFO]: Time elapsed: 3360 ms
[18:17:07] [Server thread/INFO]: Done (5.302s)! For help, type "help"
[18:17:07] [Server thread/INFO]: Starting remote control listener
[18:17:07] [Server thread/INFO]: Thread RCON Listener started
[18:17:07] [Server thread/INFO]: RCON running on 0.0.0.0:25575
[18:17:07] [Server thread/INFO]: Using default voicechat socket implementation
[18:17:07] [VoiceChatServerThread/INFO]: Server started at port 24454

@Stealthii
Copy link
Contributor Author

@itzg I'm happy with the support of this in place so far. Happy to make changes to the code location and or execution order if desired!

See https://packwiz.infra.link/ for packwiz information

This commit adds support for packwiz server modpack definitions provided
by the PACKWIZ_URL environment variable. Packwiz modpack definitions are
processed before other mod definitions (MODPACK, MODS, etc.) to allow
for additional processing/overrides the operator may want to perform (in
case of mods not available via Modrinth/CurseForge, or where the pack is
not maintained by the operator).

We attempt to retrieve the latest bootstrap jar from Github if it
doesn't already exist. If for any reason retrieving release information
from Github isn't possible, we'll use the existing bootstrap jar if
already available.

Packwiz is pre-configured to show no GUI and only download server mods.
@Stealthii
Copy link
Contributor Author

Reworked that commit to match the 2-space formatting used elsewhere in the file.

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for adding this and introducing me to packwiz.

@itzg itzg merged commit aaaf779 into itzg:master Dec 7, 2021
@itzg
Copy link
Owner

itzg commented Dec 7, 2021

This is now merged and published for all of the image variants.

@Stealthii
Copy link
Contributor Author

Awesome! I took packwiz for a spin due to a new server with friends for 1.18, and the string of mod updates meant an automated solution was needed. The nice thing here is that the same set of fabric mods can be used against client/server, so automated updates are easier to handle.

Created a PR (packwiz/packwiz-website#8) against the packwiz documentation to refer to the section in the docs here.

@Stealthii Stealthii deleted the feature/packwiz branch December 7, 2021 11:25
@comp500
Copy link

comp500 commented Dec 7, 2021

👀 Thank you for contributing this! I use docker-minecraft-server personally so this is very useful for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants