通过打包程序泊坞窗生成器进行构建时,出现错误“构建'泊坞窗'错误:退出状态2”

时间:2019-12-24 20:24:27

标签: docker continuous-integration devops packer packer-builder

在尝试构建一个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": "####"
      }
    ]
  ]
}

0 个答案:

没有答案