-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM spritsail/alpine:3.18
ARG VELOCITY_VER=3.3.0-SNAPSHOT
ARG VELOCITY_BUILD=312
LABEL maintainer="Spritsail <[email protected]>" \
org.label-schema.vendor="Spritsail" \
org.label-schema.name="Velocity" \
org.label-schema.url="https://github.com/PaperMC/Velocity" \
org.label-schema.description="Modern Minecraft server network proxy" \
org.label-schema.version=${VELOCITY_VER}-${VELOCITY_BUILD} \
io.spritsail.version.velocity=${VELOCITY_VER}-${VELOCITY_BUILD}
RUN apk --no-cache add openjdk17-jre-headless nss
ADD https://api.papermc.io/v2/projects/velocity/versions/${VELOCITY_VER}/builds/${VELOCITY_BUILD}/downloads/velocity-${VELOCITY_VER}-${VELOCITY_BUILD}.jar /velocity.jar
WORKDIR /config
ENV INIT_MEM=1G \
MAX_MEM=1G \
SERVER_JAR=/velocity.jar
CMD exec java \
-Xms"$INIT_MEM" \
-Xmx"$MAX_MEM" \
-XX:+UseG1GC \
-XX:G1HeapRegionSize=4M \
-XX:+UnlockExperimentalVMOptions \
-XX:+ParallelRefProcEnabled \
-XX:+AlwaysPreTouch \
-XX:MaxInlineLevel=15 \
-jar "$SERVER_JAR"