Docker Action unable to (automatically) pull Private Docker Image

After authenticating to private docker registry (and actually able to pull the image!), running a docker action that uses private image hosted in said registry does not seem to work.

I have set up an example repository to showcase the behavior: s4nji/docker-actions-private-image-test.
Here is the specific log line with the authentication failure error.

A workaround to this is to simply pull the private image manually prior running the action using the image; but this is non ideal if multiple private images are used.

Is this a bug? Will there be any future updates to have docker action pull private images automatically?

Notes

  • I initially found the issue while trying to run docker actions with private images hosted on AWS ECR, so I do not think this is dockerhub or docker/login-action specific issue.
  • The private image in example repo is simply the current alpine:latest mirrorred to s4nji/alpine:latest as a private image on dockerhub.
  • There is this related topic but looks like it ended up adding private registry support for only job and service containers
1 Like

@s4nji is this still reproducing for you?
Logs have expired, so I can’t view the current issue:

Any chance you can perhaps re-trigger that or share more details if it’s actually an issue?
You also noted that you may have found an issue…?

Hey @lirantal, I just pushed a dummy commit to run the workflow, you can see it here.

Notice that:

  • The image is pulled successfully in Test Pull Image step (and then removed so we can see if the runner itself can pull the image)
  • The image cannot be pulled in the Test Pull Image in Docker Action step

It makes sense to assume that it just works, since we already authenticated with docker login, the credentials are there, and that explicitly pulling the image works, but this is not the case.