1
0
Fork 0

Compare commits

...

5 Commits
master ... main

Author SHA1 Message Date
yangjun ecc6d3e941 更新 Dockerfile 2023-09-19 17:01:04 +08:00
yangjun 1e9939260c 更新 Dockerfile 2023-09-19 16:55:21 +08:00
yangjun 4f704def40 更新 Dockerfile 2023-09-07 15:46:49 +08:00
yangjun 50eda71257 更新 'Dockerfile' 2023-08-31 22:11:36 +08:00
yangjun 7c8d0b0b3b 更新 'Dockerfile' 2023-08-31 20:35:51 +08:00
1 changed files with 13 additions and 4 deletions

View File

@ -6,14 +6,23 @@ RUN mkdir -p $MY_HOME
WORKDIR $MY_HOME
ADD pom.xml $MY_HOME
# get all the downloads out of the way
RUN ["/usr/local/bin/mvn-entrypoint.sh","mvn","verify","clean","--fail-never"]
# add source
ADD . $MY_HOME
# 下载maven缓存包并解压
RUN ["wget","-O","/home/cache.tar.gz","http://172.19.131.107:18800/cache/maven?name=repository"]
RUN ["tar", "-zxvf", "/home/cache.tar.gz","-C","/home"]
# get all the downloads out of the way
#RUN ["/usr/local/bin/mvn-entrypoint.sh","mvn","verify","clean","--fail-never"]
# run maven verify
RUN ["/usr/local/bin/mvn-entrypoint.sh","mvn","verify"]
RUN ["/usr/local/bin/mvn-entrypoint.sh","mvn","verify","--settings=/home/app/settings.xml" ]
# 打包maven缓存包并上传到服务器
WORKDIR /home
RUN ["tar", "-zcvf", "cache.tar.gz", "app"]
RUN ["curl","-F","file=@/home/cache.tar.gz","http://172.19.131.107:18800/cache/maven?name=repository"]
WORKDIR $MY_HOME
# Second stage - build image
FROM openjdk:8-jre-alpine