.docker / config.json vs .dockercfg [英] .docker/config.json vs .dockercfg

查看:1039
本文介绍了.docker / config.json vs .dockercfg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用docker 1.10.1将一个 docker登录发送到私有存储库时,我的〜/ .docker / config中创建了一个条目.json 文件。这个文件是否与我所看到的格式相同,称为 .dockercfg 文件? config.json 文件与 .dockercfg 文件可互换?

When I do a docker login to a private repository using docker 1.10.1, an entry is created in my ~/.docker/config.json file. Is this file in the same format as what I see being called a .dockercfg file? Is the config.json file interchangeable with a .dockercfg file?

推荐答案

我假设 config.json 是新的 .dockercfg 文件。

请参阅 docker / cliconfig / config .go

I assume config.json is the new .dockercfg file.
See "docker/cliconfig/config.go"

// ConfigFileName is the name of config file
ConfigFileName = "config.json"
oldConfigfile  = ".dockercfg"

新配置文件现在记录在 man / config-json.5 .md

The new config file is now documented under man/config-json.5.md

这是在提交18c9b6c 在docker 1.7.0(2015年4月)

That was introduced in commit 18c9b6c in docker 1.7.0 (April 2015)


添加 .docker /config.js在并支持HTTP头



此PR执行以下操作:

Add .docker/config.json and support for HTTP Headers

This PR does the following:


  • 〜/ .dockerfg 迁移到〜/ .docker / config.json

    数据被迁移,但旧文件仍然需要。

  • migrated ~/.dockerfg to ~/.docker/config.json.
    The data is migrated but the old file remains in case its needed.

这篇关于.docker / config.json vs .dockercfg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆