An open API service indexing awesome lists of open source software.

https://github.com/dweinstein/dockerode-authconfig

Normalize auth info from ~/.docker/config.json to the authConfig format for the docker daemon.
https://github.com/dweinstein/dockerode-authconfig

Last synced: about 2 months ago
JSON representation

Normalize auth info from ~/.docker/config.json to the authConfig format for the docker daemon.

Awesome Lists containing this project

README

        

# SYNOPSIS

Normalize auth info from `~/.docker/config.json` to the [`authConfig`
format](https://docs.docker.com/engine/reference/api/docker_remote_api/#authentication)
for the docker daemon.

# USAGE

Install: `npm i dockerode-authconfig`

```js
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);
```