# syntax=docker/dockerfile:1 # Build stage: use a Maven image with JDK 11 to build the project from source FROM maven:3.8.7-jdk-11-slim AS builder WORKDIR /workspace # Copy the repository and build only the core module to avoid Android tooling requirements COPY . . # Build the core module (excluding Android-related modules) to produce a runnable JAR RUN mvn -B -DskipTests install -pl core -am # Runtime stage: use a minimal JRE image FROM eclipse-temurin:11-jre WORKDIR /app # Copy built artifacts from the builder stage COPY --from=builder /workspace/core/target/core-3.5.5-SNAPSHOT.jar /app/core-3.5.5-SNAPSHOT.jar # Provide an interactive shell by default so the container is usable for exploration CMD ["bash"]
# syntax=docker/dockerfile:1 FROM maven:3.8.7-openjdk-11-slim AS builder WORKDIR /workspace # Copy the repository and build only the core module to avoid Android tooling requirements COPY . . # Build the core module (excluding Android-related modules) to produce a runnable JAR RUN mvn -B -DskipTests install -pl core -am # Runtime stage: use a minimal JRE image FROM eclipse-temurin:11-jre-slim WORKDIR /app # Copy built artifacts from the builder stage COPY --from=builder /workspace/core/target/core-3.5.5-SNAPSHOT.jar /app/core-3.5.5-SNAPSHOT.jar # Expose a shell by default for manual exploration CMD ["bash"]
# syntax=docker/dockerfile:1 # Build stage: use a Maven image with JDK 11 to build the project from source FROM maven:3.8.7-jdk-11 AS builder WORKDIR /workspace # Copy the repository and build only the core module to avoid Android tooling requirements COPY . . # Build the core module (excluding Android-related modules) to produce a runnable JAR RUN mvn -B -DskipTests install -pl core -am # Runtime stage: use a minimal JRE image FROM eclipse-temurin:11-jre WORKDIR /app # Copy built artifacts from the builder stage COPY --from=builder /workspace/core/target/core-3.5.5-SNAPSHOT.jar /app/core-3.5.5-SNAPSHOT.jar # Expose a shell by default for manual exploration CMD ["bash"]
# syntax=docker/dockerfile:1
FROM openjdk:11-jdk-slim AS builder
WORKDIR /workspace
# Install Maven for building the project from source
RUN apt-get update && \
apt-get install -y --no-install-recommends maven ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
COPY . .
# Build core module (and its dependencies) from source
RUN mvn -B -DskipTests install -pl core -am
FROM openjdk:11-jre-slim
WORKDIR /app
# Copy the built core jar from the builder stage
COPY --from=builder /workspace/core/target/core-3.5.5-SNAPSHOT.jar /app/core-3.5.5-SNAPSHOT.jar
# Provide an interactive shell by default
CMD ["bash"]
# syntax=docker/dockerfile:1
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-11-jdk maven ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
ENV PATH "$PATH:$JAVA_HOME/bin"
WORKDIR /workspace
COPY . .
RUN mvn -B -DskipTests install -pl core -am
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-11-jre-headless \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
ENV PATH "$PATH:$JAVA_HOME/bin"
WORKDIR /app
COPY --from=builder /workspace/core/target/core-3.5.5-SNAPSHOT.jar /app/core-3.5.5-SNAPSHOT.jar
# Provide an interactive shell by default
CMD ["bash"]
# Ignore git, build outputs, and IDEs .git/ .gitignore target/ out/ **/target/ **/*.class **/*.log node_modules/ *.iml .idea/ *.md.bak .DS_Store
Smoke [PASS]: test -f /app/core-3.5.5-SNAPSHOT.jar Smoke [PASS]: java -version Smoke [PASS]: test -s /app/core-3.5.5-SNAPSHOT.jar