-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile-java25
More file actions
30 lines (22 loc) · 864 Bytes
/
Dockerfile-java25
File metadata and controls
30 lines (22 loc) · 864 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
26
27
28
29
30
# Build stage
FROM --platform=linux/amd64 amazoncorretto:25-alpine AS builder
WORKDIR /build
# Copy parent pom and all modules
COPY pom.xml .
COPY sdk ./sdk
COPY sdk-testing ./sdk-testing
COPY sdk-integration-tests ./sdk-integration-tests
COPY examples ./examples
COPY coverage-report ./coverage-report
# Install Maven
RUN apk add --no-cache maven
# Build and install the SDK modules first
RUN mvn clean install -DskipTests -pl sdk,sdk-testing -am
# Build the examples project
RUN mvn clean package -DskipTests -pl examples -am
# Runtime stage
FROM public.ecr.aws/lambda/java:25
# Copy only the built JAR from build stage
COPY --from=builder /build/examples/target/*.jar ${LAMBDA_TASK_ROOT}/lib/
# Default CMD (will be overridden by ImageConfig.Command in SAM template)
CMD ["software.amazon.lambda.durable.examples.step.SimpleStepExample::handleRequest"]