File tree Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 1+ # Multi-stage build - Build stage
2+ FROM eclipse-temurin:21-jdk AS builder
3+
4+ WORKDIR /app
5+
6+ # Install Git (needed for version determination)
7+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
8+ # Copy Git directory as we need the version and build history
9+ COPY .git .git
10+
11+ # Copy Gradle wrapper and build files first
12+ COPY gradlew gradlew.bat ./
13+ COPY gradle gradle
14+ COPY build.gradle.kts settings.gradle.kts ./
15+
16+ # Make gradlew executable
17+ RUN chmod +x gradlew
18+
19+ # Copy source code
20+ COPY src src
21+
22+ # Build using your Gradle wrapper
23+ RUN ./gradlew build --no-daemon
24+
25+ # Runtime stage
126FROM amazoncorretto:23-al2023-jdk
227
328WORKDIR /app
429
5- # Copy the application JAR
6- COPY . /build/libs/mcp-task-orchestrator-*.jar /app/orchestrator.jar
30+ # Copy the built JAR from the builder stage
31+ COPY --from=builder /app /build/libs/mcp-task-orchestrator-*.jar /app/orchestrator.jar
732
833# Volume for the SQLite database and configuration
934VOLUME /app/data
Original file line number Diff line number Diff line change 11@ echo off
2- echo Building the application with Gradle...
3- call gradlew clean jar
4-
52echo Building Docker image...
6- docker build -t mcp-task-orchestrator .
3+ docker build -t mcp-task-orchestrator:dev .
You can’t perform that action at this time.
0 commit comments