Commit f8c25963 by zhangxingmin

网关docker配置

parent 0570eb06
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>2.6.6</version> <version>${springboot.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<mainClass>com.yd.auth.core.AuthApplication</mainClass> <!-- 替换为您的实际主类 --> <mainClass>com.yd.auth.core.AuthApplication</mainClass>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
......
# 基础镜像
FROM openjdk:8
# 维护人
LABEL maintainer="zxm<2060197959@qq.com>"
# 创建目录
RUN mkdir -p /home/app
# 拷贝项目jar
COPY target/yd-gateway-1.0-SNAPSHOT.jar /home/app/yd-gateway.jar
# 执行命令启动jar
ENTRYPOINT ["java", "-jar", "/home/app/yd-gateway.jar"]
# 暴露端口
EXPOSE 9002
...@@ -66,4 +66,24 @@ ...@@ -66,4 +66,24 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.yd.gateway.GatewayApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment