How to use GitHub registry docker image in a service?

Given this file – https://github.com/ldapjs/node-ldapjs/blob/cfa9790be8da59c8ef28fc661fd626c715dd95a8/.github/workflows/integration.yml

What changes do I need to make to the jobs.baseline.services.openldap configuration to successfully pull the image from the GitHub based Docker registry?

1 Like

Anyone have any ideas on this?

It looks like you are not logged in yet. You’ll need to prepend your pull step with a login one, for example with the docker/login action.

Using that action seems ill advised since it has been deprecated and the repository archived. It seems to me one should just be able to pull directly from a public repository without a login.

We currently do not support pulling containers from authenticated registeries for services or container jobs.  However, we do plan to support that in the future.

But it’s a public registry. It’s GitHub’s own Docker registry implementation attached to a free open source organization. It really doesn’t get any more public.

> But it’s a public registry. It’s GitHub’s own Docker registry implementation attached to a free open source organization. It really doesn’t get any more public.

To clarify: GitHub’s public registries still require authentication, but they’re available to anybody who successfully authenticates to GitHub.  We don’t currently support authentication.

Okay, that does clarify what is meant by “private” in this case.

So if I were to push the image to hub.docker.com I would be able to use it? I was really wanting to keep everything within the organization.

Watching this as well, I was hoping to use my Action, which I’ve published as a GitHub Package (https://github.com/mattdsteele/particle-action/packages/31833), rather than having to publish and use it from Docker Hub.

Is there a location where this feature is being tracked?

2 Likes

Also interested in how we can use a private GitHub registry docker image as a service. We need it to set up CI for a client.

We also struggled with this, so implemented it using “plain” Docker commands.

It is not ideal, but it works: https://github.community/t5/GitHub-Actions/Use-docker-images-from-GitHub-Package-Registry/m-p/36809/highlight/true#M2692

That looks nice for building and deploying images to the GitHub registry. But this issue is about using an image from the registry in a services block.

I am really confused as to why Actions released to GA without full integration with GitHub’s own registry.

This route to success does work. I just wasn’t paying enough attention to your yaml, sorry. My working example for others – https://github.com/ldapjs/node-ldapjs/pull/571/commits/b8c59af28d42905f7cd3c61e5006eaf34ab747cf