-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (20 loc) 路 724 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (20 loc) 路 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Build stage
FROM gradle:9-jdk25-alpine AS build
ARG VERSION=0.0.1-SNAPSHOT
WORKDIR /app
RUN apk add --no-cache curl bash unzip && \
curl -fsSL https://bun.sh/install | bash && \
ln -s /root/.bun/bin/bun /usr/local/bin/bun
COPY build.gradle settings.gradle ./
COPY gradle ./gradle
RUN gradle dependencies --no-daemon || true
COPY src ./src
COPY package.json bun.lock build.ts ./
RUN gradle clean bootJar -Pversion=${VERSION} --no-daemon
# Runtime stage
FROM eclipse-temurin:25-jre
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/build/libs/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "--enable-preview", "-jar", "app.jar"]