我是转换一个简单的码头-撰写文件在我的Mac与kompose。但每次我跑起来我都会得到:
WARN Unable to retrieve .docker/config.json authentication details. Check that 'docker login' works successfully on the command line.: Failed to read authentication from dockercfg
INFO Authentication credentials are not detected. Will try push without authentication.
INFO Attempting authentication credentials 'docker.io
ERRO Unable to push image 'bolbeck/simplepythonimage:latest' to registry 'docker.io'. Error: denied: requested access to the resource is denied
FATA Error while deploying application: k.Transform failed: Unable to push Docker image for service firstpythonhw: unable to push docker image(s). Check that `docker login` works successfully on the command line 科米斯转换工作良好,因为它不试图拉出图像。另外,docker login在终端上工作得很好,我可以手动推送图像。
下面是docker-组合文件:
version: "3"
services:
firstpythonhw:
build: .
image: MyAccount/pythonimage
container_name: pythonhw
ports:
- "5000:5000"我使用Kompose版本1.18.0和Minikube版本1.4.0
发布于 2019-09-25 10:53:54
根据科米斯文档,在推映像操作期间,Docker身份验证数据实际上是按以下文件夹检查顺序从docker文件中检索的:
$DOCKER_CONFIG/config.json, $HOME/.docker/config.json , $HOME/.dockercfg实际上,当您通过docker login登录到注册表时,该命令将凭据保存在config.json文件中。然而,Docker还提供了一种方法,通过https://docs.docker.com/engine/reference/commandline/#credentials-store外部存储用户身份验证数据,作为甚至操作系统范围内的密钥链的主要存储空间。但这一次,Kompose将不会识别Docker配置文件和整个内容结构。
在Mac中,您可以找到https://support.apple.com/en-gb/guide/keychain-access/kyca1083/mac,因为您已经检查了docker login --我认为base64编码的凭据没有存储在config.json文件中,它们只是导出到特定macOS上的“osxkeychain”。
更新:
典型的config.json文件结构:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "base64 encoded username:password"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.09.7 (linux)"
}
}发布于 2019-12-09 12:19:06
尝试以下命令在您的计算机上生成base64字符串
echo -n 'username:password' | base64以这个的输出
并添加到停靠器撰写文件中。
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "your base 64 string"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.09.7 (linux)"
}
}https://stackoverflow.com/questions/58072426
复制相似问题