apache-dubbo
SUCCESS
25m 23s
History Source
SummaryIterations1Transcript21Dockerfile
Dockerfile27 lines · 663 chars
FROM eclipse-temurin:21-jdk AS builder

WORKDIR /build

# Install lightweight build tools needed by Maven Wrapper
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
      curl ca-certificates git unzip \
    && rm -rf /var/lib/apt/lists/*

COPY . .

# Ensure Maven wrapper is executable
RUN chmod +x mvnw

# Build only a subset of modules to speed up the build (could also build all)
RUN ./mvnw -B -DskipTests install -pl dubbo-common -am

# Runtime image
FROM eclipse-temurin:21-jre

WORKDIR /app

COPY --from=builder /build /app

CMD ["bash", "-lc", "echo 'Dubbo repository built from source'; ls -la /app"]