add piped dockerfile

This commit is contained in:
DarkCat09 2025-01-28 18:10:00 +04:00
parent 0025a3a84e
commit 4f834b1a2c
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

View file

@ -1 +1,26 @@
FROM git.dc09.ru/darkcat09/openj9:latest AS build FROM eclipse-temurin:21-jdk-noble AS build
WORKDIR /app
RUN apt update && apt install -y git && rm -rf /var/lib/apt/lists/*
RUN git clone --single-branch --depth 1 https://github.com/TeamPiped/Piped-Backend.git ./
RUN ./gradlew shadowJar
RUN sh -c 'echo "$(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD)" >VERSION'
# ------
FROM git.dc09.ru/darkcat09/openj9:latest AS run
WORKDIR /app
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
COPY --from=build /app/VERSION /app/VERSION
CMD java -server -Xmx${MAX_MEMORY:-1G} -Xaggressive \
-XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication \
-XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon \
-Xshareclasses:allowClasspaths -Xtune:virtualized -Xcompactgc \
-jar /app/piped.jar
# ------