spring cloud 整合docker打包时,出错Failed to execute goal com.spotify:docker-maven-plugin:1.0.0

目录

1.第一次打包时出现: Exception caught: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.spotify.docker.client.messages.RegistryAuth: no String-argument constructor/factory method to deserialize from String value ('desktop')

2.修正第一次打包问题时,第二次打包时出现:Exception caught: manifest for java:8 not found: manifest unknown: manifest unknown ed access to the resource is denied -> [Help 1]


1.第一次打包时出现:Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (build-image) on project server-auth: Exception caught: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.spotify.docker.client.messages.RegistryAuth: no String-argument constructor/factory method to deserialize from String value ('desktop')

检查了自己的配置,发现是打包的插件版本太低了,把version换成1.2.2,这个错误就解决了

<plugin>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-maven-plugin</artifactId>
     <version>1.0.0</version>
</plugin>

2.修正第一次打包问题时,第二次打包时出现:[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.2.2:build (build-image) on project server-auth: Exception caught: manifest for java:8 not found: manifest unknown: manifest unknown ed access to the resource is denied -> [Help 1]

看起来是jdk的问题,查阅了多方资料,发现是docker不支持Java镜像,需要用别的镜像替换,把下面的代码换成<baseImage>openjdk:8</baseImage>就行了

<baseImage>java:8</baseImage>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值