From 97eb2f92abaae1e724ca1576521a92dc91dc621a Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 02 六月 2023 22:02:23 +0800 Subject: [PATCH] webservice添加打包插件 --- Source/UBCS/ubcs-service/ubcs-webservice/pom.xml | 20 ++++++++++++++++---- Source/UBCS/service-start.sh | 2 +- Source/UBCS/ubcs-service/ubcs-webservice/Dockerfile | 4 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Source/UBCS/service-start.sh b/Source/UBCS/service-start.sh index fc5b0b2..39be24c 100644 --- a/Source/UBCS/service-start.sh +++ b/Source/UBCS/service-start.sh @@ -71,7 +71,7 @@ #鍚姩applyjtcodeservice鏈嶅姟 docker build -f ./ubcs-service/ubcs-webservice/Dockerfile -t vci-ubcs/ubcs-applyjtcodeservice . - docker run -d -p 36015:36015 --name ubcs-applyjtcodeservice vci-ubcs/ubcs-applyjtcodeservice:latest + docker run -d -p 36016:36016 --name ubcs-applyjtcodeservice vci-ubcs/ubcs-applyjtcodeservice:latest #鍏朵粬鏈嶅姟璇疯嚜琛屾坊鍔� diff --git a/Source/UBCS/ubcs-service/ubcs-webservice/Dockerfile b/Source/UBCS/ubcs-service/ubcs-webservice/Dockerfile index 85428a4..5d76fc4 100644 --- a/Source/UBCS/ubcs-service/ubcs-webservice/Dockerfile +++ b/Source/UBCS/ubcs-service/ubcs-webservice/Dockerfile @@ -6,9 +6,9 @@ WORKDIR /ubcs/applyjtcodeservice #鍦ㄥ鍣ㄤ腑浠ュ灏戠鍙h繍琛� -EXPOSE 36014 +EXPOSE 36016 -ADD ./target/ubcs-applyjtcodeservice.jar ./app.jar +ADD ./target/ubcs-webservice.jar ./app.jar ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] diff --git a/Source/UBCS/ubcs-service/ubcs-webservice/pom.xml b/Source/UBCS/ubcs-service/ubcs-webservice/pom.xml index 3d17a56..df27794 100644 --- a/Source/UBCS/ubcs-service/ubcs-webservice/pom.xml +++ b/Source/UBCS/ubcs-service/ubcs-webservice/pom.xml @@ -46,16 +46,28 @@ <scope>compile</scope> </dependency> </dependencies> + <build> <plugins> <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> + <groupId>com.spotify</groupId> + <artifactId>dockerfile-maven-plugin</artifactId> <configuration> - <skip>true</skip> - <finalName>${project.name}</finalName> + <username>${docker.username}</username> + <password>${docker.password}</password> + <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository> + <tag>${project.version}</tag> + <useMavenSettingsForAuth>true</useMavenSettingsForAuth> + <buildArgs> + <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> + </buildArgs> + <skip>false</skip> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + </plugin> </plugins> </build> </project> -- Gitblit v1.9.3