dockerode-authconfig
v1.0.1
Published
normalize to `authConfig` format for docker daemon
Downloads
20
Maintainers
Readme
SYNOPSIS
Normalize auth info from ~/.docker/config.json
to the authConfig
format
for the docker daemon.
USAGE
Install: npm i dockerode-authconfig
var assert = require('assert');
var normalize = require('.');
var orig = {
auths: {
'foo.bar.baz': {
email: '[email protected]',
auth: 'QGZvbzpzdXBlcmR1cGVyZG8='
},
'already.ready': {
username: '@ok',
password: 'okyouwin'
}
}
};
var res = normalize(orig);
assert.deepEqual(res, {
auths: {
'foo.bar.baz': {
username: '@foo',
password: 'superduperdo'
},
'already.ready': {
username: '@ok',
password: 'okyouwin'
}
}
});
console.log('----orig----');
console.log(orig);
console.log('----norm----');
console.log(res);