File tree Expand file tree Collapse file tree 2 files changed +62
-6
lines changed Expand file tree Collapse file tree 2 files changed +62
-6
lines changed Original file line number Diff line number Diff line change 1- FROM eclipse-temurin:8-jdk-alpine
1+ # syntax=docker/dockerfile:1.3-labs
2+
3+ FROM maven:3-eclipse-temurin-8-alpine
24
35# copy arthas
46COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
57
68RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
79RUN apk add wget unzip tcpdump ngrep iproute2-ss bind-tools
810
11+ COPY <<EOF /root/.m2/settings.xml
12+ <?xml version=\" 1.0\" ?>
13+ <settings>
14+ <mirrors>
15+ <mirror>
16+ <id>alimaven</id>
17+ <name>aliyun maven</name>
18+ <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
19+ <mirrorOf>central</mirrorOf>
20+ </mirror>
21+ <mirror>
22+ <id>maven-default-http-blocker</id>
23+ <mirrorOf>!*</mirrorOf>
24+ <url>http://0.0.0.0/</url>
25+ </mirror>
26+ </mirrors>
27+ </settings>
28+ EOF
29+
930WORKDIR /app
10- COPY /target/B-1.0.0.jar /app
31+
32+ COPY ./ ./
33+
34+ RUN --mount=type=cache,target=/root/.m2/repository/ \
35+ mvn clean package --batch-mode
1136
1237EXPOSE 20002
1338ENTRYPOINT ["sh" , "-c" ]
14- CMD ["java -jar /app/B-1.0.0.jar" ]
39+ CMD ["java -jar /app/target/ B-1.0.0.jar" ]
Original file line number Diff line number Diff line change 1- FROM dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:8-extended-ga-centos
1+ # syntax=docker/dockerfile:1.3-labs
2+
3+ FROM maven:3-eclipse-temurin-8-alpine as build
24
35# copy arthas
46COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
57
8+ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
9+
10+ COPY <<EOF /root/.m2/settings.xml
11+ <?xml version=\" 1.0\" ?>
12+ <settings>
13+ <mirrors>
14+ <mirror>
15+ <id>alimaven</id>
16+ <name>aliyun maven</name>
17+ <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
18+ <mirrorOf>central</mirrorOf>
19+ </mirror>
20+ <mirror>
21+ <id>maven-default-http-blocker</id>
22+ <mirrorOf>!*</mirrorOf>
23+ <url>http://0.0.0.0/</url>
24+ </mirror>
25+ </mirrors>
26+ </settings>
27+ EOF
28+
629WORKDIR /app
7- COPY /target/C-1.0.0.jar /app
30+
31+ COPY ./ ./
32+
33+ RUN --mount=type=cache,target=/root/.m2/repository/ \
34+ mvn clean package --batch-mode
35+
36+ FROM dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:8-extended-ga-centos
37+
38+ COPY --from=build /app/target/C-1.0.0.jar /app/target/C-1.0.0.jar
839
940EXPOSE 20003
1041ENTRYPOINT ["sh" , "-c" ]
11- CMD ["java -jar /app/C-1.0.0.jar" ]
42+ CMD ["java -jar /app/target/ C-1.0.0.jar" ]
You can’t perform that action at this time.
0 commit comments