在尝试构建一个Maven项目槽式包装机时出现波纹管错误。
docker:输出将采用这种颜色。
构建'docker'错误:退出状态2
==>一些构建未成功完成,并出现错误: ->码头工人:退出状态2
==>构建完成,但未创建任何构件。
在下面粘贴我的打包程序构建代码(.json),请提供帮助。
{
"builders": [{
"type": "docker",
"image": "maven:3.6.0-jdk-11-slim",
"commit": "true",
"changes": [
"WORKDIR /",
"CMD [\"mvn package\"]",
"CMD [\"mv target/SpringExample-2.0.3-SNAPSHOT.jar app.jar\"]",
"ENTRYPOINT [\"docker-entrypoint.sh\"]"
]
}],
"provisioners": [
{
"type": "shell",
"inline": ["mkdir -p /src"]
},
{
"type": "file",
"source": "src/",
"destination": "/src/"
},
{
"type": "file",
"source": "pom.xml",
"destination": "/"
},
{
"type": "file",
"source": "docker-entrypoint.sh",
"destination": "/"
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "satwikmukherjee/####",
"tag": "maven1.0"
},
{
"type": "docker-push",
"login": "true",
"login_username": "#####",
"login_password": "####"
}
]
]
}