docker运行spring boot 包镜像出现no main manifest attribute问题
2019-01-24 12:57
573 查看
问题
在进行docker部署的时候,开始对项目进行打包,在启动该镜像时
运行命令docker logs 【容器ID】,查看运行日志
提示:
[code]no main manifest attribute, in app.jar
提示没有入口类信息
解决
项目基于maven pom多模块的开发的,需要设置goal-repackage属性为true,否则打包后文件依赖文件没有一起打包,然后镜像内没有可以运行的程序文件
如下:
[code]<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <!--加入下面两项配置--> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin>
相关文章推荐
- Linux系统下运行jar文件,提示:No main manifest attribute, in XXX.jar
- springboot项目打包后运行出现问题解决办法
- 第一个SpringBoot web 应用使用maven构建Docker镜像并容器化运行
- dockerfile创建镜像运行spring-boot
- Spring Boot 集成servlet,发布为可直接运行的war包,方便后续打包为docker镜像。
- 关于python里运行出现'module' object has no attribute 'xxxx'等问题解决方法
- jar 打包java class文件后,运行jar 出现 Failed to load Main-Class manifest attribute from 错误
- 使用spring boot连接数据库出现no profiles are currently active的问题
- Linux系统下运行jar文件,提示:No main manifest attribute, in XXX.jar
- Spring Boot使用Feign客户端调用远程服务时出现:timed-out and no fallback available,failed and no fallback available的问题解决
- Linux系统下运行jar文件,提示:No main manifest attribute, in XXX.jar
- maven编译生成的jar包运行出现 "Failed to load Main-Class manifest attribute from"
- Spring Boot 的项目打包成的 JAR 包,制作成 docker 镜像并运行
- Maven使用package打包Spring Boot时出现:Unable to find a single main class from the following candidates的问题解决
- no main manifest attribute
- 学习笔记:微服务-20 docker中运行spring boot
- 【求助】Spring Boot 2 与Activiti 7 整合出现打开URL出现signin问题
- spring3+struts2+hibernate3整合出现的问题,No mapping found for dependency [type=java.lang.String, name='str
- 关于Androidstudio中NavigationView出现的问题(No resource identifier found for attribute 'headerLayout' )及解决方法
- 解决pycharm问题:module 'pip' has no attribute 'main'