Remove Dockerfile and clouderized.yaml from customer repo
These are operator-managed files generated by the Clouderized platform. Customer repos contain source code only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
42
Dockerfile
42
Dockerfile
@@ -1,42 +0,0 @@
|
||||
# === Build stage ===
|
||||
# Updated to JDK 25 for better performance and longer support
|
||||
FROM eclipse-temurin:25-jdk AS build
|
||||
|
||||
# Modern GPG handling & sbt install
|
||||
RUN apt-get update && apt-get install -y curl gnupg && \
|
||||
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --dearmor > /etc/apt/trusted.gpg.d/sbt.gpg && \
|
||||
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" > /etc/apt/sources.list.d/sbt.list && \
|
||||
apt-get update && apt-get install -y sbt && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Optimization: Copy ALL build definitions first
|
||||
# This ensures caching works if your source code changes but dependencies don't.
|
||||
COPY build.sbt .
|
||||
COPY project/*.sbt project/*.properties project/*.scala project/
|
||||
RUN sbt update
|
||||
|
||||
# Build the assembly (Fat JAR)
|
||||
COPY src/ src/
|
||||
RUN sbt "set test in assembly := false" assembly
|
||||
|
||||
# === Runtime stage ===
|
||||
# Updated to the latest JRE 25 on Alpine
|
||||
FROM eclipse-temurin:25-jre-alpine
|
||||
|
||||
# Security: Create a non-root user
|
||||
RUN addgroup -S app && adduser -S app -G app
|
||||
WORKDIR /app
|
||||
|
||||
# Adjust path for Scala 3.7.1
|
||||
COPY --from=build --chown=app:app /app/target/scala-3.7.1/demoapp.jar ./demoapp.jar
|
||||
|
||||
USER app
|
||||
EXPOSE 8080
|
||||
|
||||
# Optimization: Use cgroup-aware RAM limits
|
||||
ENV PORT=8080
|
||||
ENV JAVA_OPTS="-XX:MaxRAMPercentage=75.0 -XX:+UseContainerSupport -XX:+ExitOnOutOfMemoryError"
|
||||
|
||||
ENTRYPOINT ["sh", "-c", "exec java $JAVA_OPTS -jar demoapp.jar"]
|
||||
Reference in New Issue
Block a user