@lagomoof Thanks for your tip on recompressing the JARs. I had thought of that, but I was hesitant to modify them.
I'm thinking aloud for a bit:
The size contributors in the image are:
- 9 MiB Alpine base image
- 49 MiB Minecraft dependencies (JARs) in ./libraries
- 18 MiB Minecraft server JAR
- 17 MiB Custom datapacks (11)
- 38 MiB Custom mods (37)
- 92 MiB Fabric cache
- 22 MiB Fabric launcher, Opentelemetry and Jolokia JARs
- 60 MiB JDK
This sums up to 305 MiB, which matches approx. what `dive` reports about the image. Docker however reports an image size of 574 MiB, so I don't know where that huge discrepancy stems from.
My Docker image pulls in all the required JARs during the image build. Maybe that's something I could defer to container startup. Concretely, I should probably not store the fabric cache, the server JAR and dependencies in the image. Maybe, I can also fetch the Mods/Datapacks at startup, although that would require hitting Modrinth every time a container starts.