File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Petclinic download and compilation stage
2
2
FROM eclipse-temurin:17-jammy as petclinic
3
3
4
+ ARG SPRING_PETCLINIC_COMMIT=cefaf55dd124d0635abfe857c3c99a3d3ea62017
5
+
4
6
RUN apt-get update \
5
7
&& apt-get -y install git \
6
8
&& apt-get -y clean \
7
9
&& rm -rf /var/lib/apt/lists/*
8
10
9
- RUN git clone --depth 1 --branch main --single-branch https://github.com/spring-projects/spring-petclinic.git \
10
- && cd spring-petclinic \
11
- && ./mvnw dependency:go-offline
11
+ RUN set -eux;\
12
+ git init spring-petclinic;\
13
+ cd spring-petclinic;\
14
+ git remote add origin https://github.com/spring-projects/spring-petclinic.git;\
15
+ git fetch --depth 1 origin ${SPRING_PETCLINIC_COMMIT};\
16
+ git checkout ${SPRING_PETCLINIC_COMMIT};\
17
+ ./mvnw dependency:go-offline
12
18
13
19
RUN cd spring-petclinic \
14
20
&& ./mvnw package -Dmaven.test.skip=true \
You can’t perform that action at this time.
0 commit comments