gpt4 book ai didi

docker - 任务 ':buildDB2BotcImage'的执行失败

转载 作者:行者123 更新时间:2023-12-03 05:10:25 24 4
gpt4 key购买 nike

System Info : Windows 10 Enterprise

Gradle Version 4.3.1

Docker Version 17.10.0-ce, build f4ffd25



我在执行gradle.build时遇到问题,错误
Unrecognized field "identitytoken" (class com.github.dockerjava.api.model.AuthConfig), not marked as ignorable (6 known properties: "serveraddress", "username", "auth", "password", "email", "registrytoken"])
at [Source: N/A; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["auths"]->java.util.LinkedHashMap["registry.au-syd.bluemix.net"]->com.github.dockerjava.api.model.AuthConfig["identitytoken"])

我进行了一些研究,找到了这个 https://github.com/bmuschko/gradle-docker-plugin/issues/310,并在build.gradle中进行了一些更改,但仍然出现此错误。

我在build.gradle文件的一部分之一中所做的更改:

以前:
docker {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
url = 'tcp://localhost:2376'
certPath = new File(System.properties['user.home'], '.docker/machine/certs')
}
registryCredentials {
url = 'https://maxrep01.swg.usma.ibm.com/'
username = 'username'
password = 'secret'
}
}

已更改:
docker {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
if (new File("\\\\.\\pipe\\docker_engine").exists()) {
url = 'npipe:////./pipe/docker_engine'
}
else {
url = 'tcp://localhost:2376'
}
certPath = new File(System.properties['user.home'], '.docker/machine/certs')
}
registryCredentials {
url = 'https://maxrep01.swg.usma.ibm.com/'
username = 'username'
password = 'secret'
}
}

这是我得到的唯一有用的链接,但是我无法得到问题是什么,我的理解是它与Windows 10有关,但是根据该链接,我所做的更改应该可以解决问题。

我不确定这里出什么问题了吗?

最佳答案

您的问题很可能与Issue #921项目的docker-java有关。

Hello, we got the issue, using latest version of "docker-java" while trying to load and parse DOCKER configuration file ("$HOME/.docker/config.json").

It doesn't accept the field 'identitytoken'. I have noticed that you have 'registrytoken' field, which have been used since DOCKER API v1.22 version for the same purpose. I checked documentation, it was renamed there into --> 'identitytoken' just in the next DOCKER API v1.23 version.


如果等待下一个 docker-java版本是 Not Acceptable ,则可能需要调整 config.json以适合您的需求。

关于docker - 任务 ':buildDB2BotcImage'的执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48421676/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com