Docker pull from AWS failing - login not persisting to the pull cmd

Expected behavior

  1. Running aws sso login { ... } which successfully returns an access token.
  2. Then running docker login --username AWS --password-stdin { ... } returns “Login Succeeded”.
  3. On running docker pull { the container above / the image to pull} the image should be pulled from AWS.

Actual behavior

  1. After 2, though Login succeeded the config file in Users/{my-user}/.docker “auths” is empty.

  2. I get the following error on running step 3: Error response from daemon: pull access denied for { the container/image }, repository does not exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.

Additional Information

  1. I have redownloaded docker after deleting all docker folders under Users.
  2. I have re-authed and successfully logged in and still run into this issue.
  3. I have tried logging out of docker, echoing the aws response and piping it into the docker login, and then trying to pull after a “successful” login and the pull still failed.
  4. Others have been able to successfully run these steps in the exact same manner and managed to pull the images. I’ve compared my config files and they all match.
  5. The aws cmd successfully returned a token.

Any familiarity with this problem, debugging suggestions, or potential fixes are most welcome - thanks.

1 Like