-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 780 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (24 loc) · 780 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
31
32
33
34
# Build image with tag
# docker build -t kilemon/message-queue:0.1.5 .
# docker tag kilemon/message-queue:0.1.5 kilemon/message-queue:latest
#
# Push image to remote
# docker push kilemon/message-queue:0.1.5
FROM gradle:8.14.4-jdk17-alpine AS builder
WORKDIR /builder
# Copy everything in
COPY ./src ./src
COPY build.gradle.kts .
COPY gradle ./gradle
COPY gradle.properties .
COPY settings.gradle.kts .
# Run gradle build/package/tests
RUN ["gradle", "build", "-x", "test"]
FROM amazoncorretto:17-alpine3.23-jdk AS runner
RUN apk update && apk upgrade --no-cache
WORKDIR /messagequeue
# Copy in artifact from above step
COPY --from=builder /builder/build/libs/messagequeue-*.jar ./messagequeue.jar
EXPOSE 8080
EXPOSE 8443
ENTRYPOINT ["java", "-jar", "messagequeue.jar"]