-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (20 loc) · 898 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (20 loc) · 898 Bytes
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
# ---------- Build stage ----------
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /build
# Cache dependencies separately from sources for fast rebuilds
COPY pom.xml .
RUN mvn -B -q dependency:go-offline
COPY src ./src
# Tests run in CI; the image build only packages
RUN mvn -B -q package -DskipTests
# ---------- Runtime stage ----------
FROM eclipse-temurin:21-jre-alpine
RUN addgroup -S cineseekerr && adduser -S cineseekerr -G cineseekerr
# Holds the pending-downloads state file (see DOWNLOAD_STATE_FILE); mount a volume here
# so a container recreation doesn't lose track of in-flight downloads.
RUN mkdir -p /data && chown cineseekerr:cineseekerr /data
USER cineseekerr
WORKDIR /app
COPY --from=build /build/target/cineseekerr-*.jar app.jar
# Container-aware JVM sizing; the bot is tiny, keep the footprint small
ENTRYPOINT ["java", "-XX:MaxRAMPercentage=75.0", "-jar", "app.jar"]