How to use docker-progress - 1 common examples

To help you get started, we’ve selected a few docker-progress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github balena-io / balena-preload / lib / preload.js View on Github external
.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(() => {

docker-progress

This module provides additional progress mechanics on top of dockerode

Apache-2.0
Latest version published 4 months ago

Package Health Score

67 / 100
Full package analysis

Popular docker-progress functions

Similar packages