forked from kettingpowered/kettinglauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerFile
More file actions
17 lines (12 loc) · 653 Bytes
/
Copy pathDockerFile
File metadata and controls
17 lines (12 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM eclipse-temurin:17
ARG MINECRAFT_VERSION=1.20.4
ENV MINECRAFT_VERSION=${MINECRAFT_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
# Fetch the latest release information and download the second JAR file from the assets
RUN apt-get update && apt-get install -y curl jq \
&& filename=$(curl -s https://api.github.com/repos/kettingpowered/kettinglauncher/releases/latest | jq -r '.assets[] | select(.name | contains("sources.jar") | not) | .browser_download_url') \
&& echo "Downloading ${filename}" \
&& curl -L ${filename} -o launcher.jar \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["java", "-jar", "/app/launcher.jar"]