|
1 | 1 | # Git repository and ref the HeadlessMC launcher is built from. These are |
2 | 2 | # normally supplied by `autotester build-images` from settings.yaml |
3 | | -# (headlessmc.repo/ref). The defaults below are only a fallback for a bare |
4 | | -# `docker build` and point at upstream HeadlessMC; set headlessmc.repo/ref in |
5 | | -# settings.yaml to build a patched launcher (e.g. for MC 26.2 headless). |
| 3 | +# (headlessmc.repo/ref). The defaults also use the pinned upstream release. |
6 | 4 | ARG HEADLESSMC_REPO=https://github.com/headlesshq/headlessmc.git |
7 | | -ARG HEADLESSMC_REF=main |
| 5 | +ARG HEADLESSMC_REF=2.10.0 |
8 | 6 |
|
9 | 7 | # ── Builder: compile the HeadlessMC launcher wrapper jar ────────────── |
10 | 8 | # HeadlessMC must be built with JDK 21 (its Gradle build rejects newer JDKs). |
@@ -35,37 +33,18 @@ FROM ubuntu:26.04 |
35 | 33 | ENV DEBIAN_FRONTEND=noninteractive |
36 | 34 | ENV HMC_HOME=/work/hmc-cache |
37 | 35 |
|
38 | | -# Install Java 17, 21, 25 from repos. Two things newer FancyModLoader (21.10+/26.x) needs that |
39 | | -# the previous headless-only setup didn't provide: |
40 | | -# - The full (non-headless) *-jre packages: FatalErrorReporting.reportFatalError tries a Swing |
41 | | -# dialog even in headless mode - if it can't (java.desktop's libawt_xawt.so is only shipped |
42 | | -# by the non-headless package), that UnsatisfiedLinkError itself crashes the client and |
43 | | -# replaces the real error in the log, making any such failure undiagnosable. |
44 | | -# - xvfb (below): even with -Djava.awt.headless=true, this JDK's HeadlessGraphicsEnvironment |
45 | | -# still wraps a real X11GraphicsEnvironment internally on Linux and fails without a display |
46 | | -# to connect to - so Swing dialogs need a (virtual) X server regardless of the headless flag. |
| 36 | +# HeadlessMC's LWJGL transformer does not need an X server or desktop Java runtime. |
47 | 37 | RUN apt-get update \ |
48 | 38 | && apt-get install -y --no-install-recommends \ |
49 | 39 | ca-certificates \ |
50 | 40 | curl \ |
51 | 41 | unzip \ |
52 | 42 | bash \ |
53 | 43 | procps \ |
54 | | - xvfb \ |
55 | 44 | libatomic1 \ |
56 | | - libx11-6 \ |
57 | | - libxext6 \ |
58 | | - libxrender1 \ |
59 | | - libxtst6 \ |
60 | | - libxi6 \ |
61 | | - libxrandr2 \ |
62 | | - libxxf86vm1 \ |
63 | | - libgl1 \ |
64 | | - libglx-mesa0 \ |
65 | | - libasound2t64 \ |
66 | | - openjdk-17-jre \ |
67 | | - openjdk-21-jre \ |
68 | | - openjdk-25-jre \ |
| 45 | + openjdk-17-jre-headless \ |
| 46 | + openjdk-21-jre-headless \ |
| 47 | + openjdk-25-jre-headless \ |
69 | 48 | && rm -rf /var/lib/apt/lists/* |
70 | 49 |
|
71 | 50 | RUN mkdir -p /opt/headlessmc /opt/automodpack /work/game /work/hmc-cache \ |
|
0 commit comments