Skip to content

Commit 833cc08

Browse files
authored
use and reference only one base image
inspiration from #1319
1 parent 201717b commit 833cc08

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

k8s/docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Build Stage
2-
FROM eclipse-temurin:21-jdk AS build
1+
FROM eclipse-temurin:21-jdk AS base
32
MAINTAINER daynnnnn
43

54
# Setting environment variables
@@ -12,6 +11,9 @@ ARG DB_PASSWORD
1211
ARG DB_DATABASE
1312
ARG DB_PORT
1413

14+
# Build Stage
15+
FROM base as build
16+
1517
# Set the working directory for the build stage
1618
WORKDIR /code
1719

@@ -37,7 +39,7 @@ RUN chmod +x mvnw
3739
RUN ./mvnw clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
3840

3941
# Release Stage
40-
FROM eclipse-temurin:21-jdk AS release
42+
FROM base AS release
4143

4244
# Copy relevant files from the build stage
4345
COPY --from=build /code/target/steve.jar /app/steve.jar

0 commit comments

Comments
 (0)