mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-05-11 02:34:13 +02:00
Switch to Eclipse Temurin JRE in Docker images
This commit is contained in:
parent
f211708509
commit
20ff2871fa
47
Dockerfile
47
Dockerfile
@ -26,45 +26,28 @@ RUN dotnet publish Server/Phantom.Server.Web/Phantom.Server.Web.csproj -c Releas
|
||||
RUN dotnet publish Server/Phantom.Server/Phantom.Server.csproj -c Release -o /app/out
|
||||
|
||||
|
||||
# +------------------------------+
|
||||
# | Download older Java versions |
|
||||
# +------------------------------+
|
||||
FROM ubuntu:focal AS java-legacy
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
|
||||
--mount=target=/var/cache/apt,type=cache,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
openjdk-8-jre-headless \
|
||||
openjdk-16-jre-headless \
|
||||
openjdk-17-jre-headless
|
||||
|
||||
|
||||
# +------------------------------+
|
||||
# | Finalize Phantom Agent image |
|
||||
# +------------------------------+
|
||||
FROM mcr.microsoft.com/dotnet/runtime:7.0-jammy AS phantom-agent
|
||||
|
||||
COPY --from=java-legacy /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/java-8-openjdk-amd64
|
||||
COPY --from=java-legacy /usr/lib/jvm/java-16-openjdk-amd64 /usr/lib/jvm/java-16-openjdk-amd64
|
||||
COPY --from=java-legacy /usr/lib/jvm/java-17-openjdk-amd64 /usr/lib/jvm/java-17-openjdk-amd64
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
|
||||
--mount=target=/var/cache/apt,type=cache,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
openjdk-18-jre-headless \
|
||||
zstd
|
||||
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS phantom-agent
|
||||
|
||||
RUN mkdir /data && chmod 777 /data
|
||||
WORKDIR /data
|
||||
|
||||
COPY --from=eclipse-temurin:8-jre /opt/java/openjdk /opt/java/8
|
||||
COPY --from=eclipse-temurin:16-jdk /opt/java/openjdk /opt/java/16
|
||||
COPY --from=eclipse-temurin:17-jre /opt/java/openjdk /opt/java/17
|
||||
COPY --from=eclipse-temurin:20-jre /opt/java/openjdk /opt/java/20
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
|
||||
--mount=target=/var/cache/apt,type=cache,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
zstd
|
||||
|
||||
COPY --from=phantom-agent-builder --chmod=755 /app/out /app
|
||||
|
||||
ENTRYPOINT ["dotnet", "/app/Phantom.Agent.dll"]
|
||||
|
Loading…
Reference in New Issue
Block a user