Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit beb27c7

Browse files
committed
Add support for private Docker repositories / registries
This closes exoframejs/exoframe#117
1 parent 1958e36 commit beb27c7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/docker/init.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@ const baseFolder = path.join(os.homedir(), '.exoframe');
1717
const pullImage = tag =>
1818
new Promise(async (resolve, reject) => {
1919
let log = '';
20-
docker.pull(tag, (err, stream) => {
20+
21+
const auth = {
22+
username: 'username',
23+
password: 'password',
24+
auth: '',
25+
email: 'your@email.email',
26+
serveraddress: 'https://some.private.registry'
27+
};
28+
29+
const authConfig = auth ? {'authconfig': auth} : undefined;
30+
31+
docker.pull(tag, authConfig, (err, stream) => {
2132
if (err) {
2233
logger.error('Error pulling:', err);
2334
reject(err);

0 commit comments

Comments
 (0)