Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((registryToken) => {
const opts = { authconfig: { registrytoken: registryToken } }
// Docker connection
// We use localhost on windows because of this bug in node < 8.10.0:
// https://github.com/nodejs/node/issues/14900
const innerDockerProgress = new dockerProgress.DockerProgress({
Promise,
host: (os.platform() === 'win32') ? 'localhost' : '0.0.0.0',
port: this.dockerPort
})
const pullingProgressName = `Pulling ${this._pluralize(images.length, 'image')}`
// Emit progress events while pulling
const onProgressHandlers = innerDockerProgress.aggregateProgress(images.length, (e) => {
this._progress(pullingProgressName, e.percentage)
})
return Promise.map(images, (image, index) => {
return innerDockerProgress.pull(image, onProgressHandlers[index], opts)
})
})
.then(() => {