dockerode icon indicating copy to clipboard operation
dockerode copied to clipboard

Can't able to pull from private repo

Open premkumar2499 opened this issue 4 years ago • 1 comments

I am trying to pull the image from a private repo in AWS. I am providing the correct auth token in the docker pull API docker.pull('image:tag', { authConfig : auth }, function (err,stream) { }): But it throws an error like unable to access repo, Docker login required. But i am able to pull the public images using this API (like Ubuntu). It will be useful if somebody try to pull an image from the private repo using a token

premkumar2499 avatar Jan 24 '22 10:01 premkumar2499

Im using it like this, and it works just fine.

const options = {
  authconfig: {
    username: USERNAME,
    password: PASSWORD,
  }
}

Dockerode.pull("my.registry/nginx:latest", options, (error, stream) => ...)

Be careful using the authconfig with public images, it wont work.

MatusBoa avatar Mar 21 '22 18:03 MatusBoa

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Open a new issue if needed.

stale[bot] avatar Sep 23 '23 04:09 stale[bot]