Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make registry accesible for the docker daemon #4

Open
elek opened this issue Sep 28, 2022 · 2 comments
Open

Make registry accesible for the docker daemon #4

elek opened this issue Sep 28, 2022 · 2 comments

Comments

@elek
Copy link
Owner

elek commented Sep 28, 2022

This is the biggest blocking problem with this extension, right now.

The MVP goal is to push/pull images with the help of a local registry (which is backed by StorjDCS).

This is equivalent with:

docker run -p 9999:5000 -e REGISTRY_STORAGE_STORJ_BUCKET=docker -e REGISTRY_STORAGE_STORJ_ACCESSGRANT=$(cat /tmp/grant) ghcr.io/elek/distribution:618d19fb
docker tag elek/herbstag localhost:9999/elek/herbstag
docker push localhost:9999/elek/herbstag

Unfortunately it's not so easy to start AND access the port of the container.
The port 9999 should be accessible:

  • by the docker daemon itself (to push images)
  • by the extension backend (to check the already uploaded images)

The approaches what we tried out until now:

  • We started new docker instance from backend (docker run...) with forwarded port

    • This approach requires a free port on host
    • The port is accessible by the docker daemon but not by the extension (!!!)
  • We started the registry inside the backend container as a new unix process

    • This makes it available for the backend (to check the already uploaded images)
    • But the port is not available for the docker daemon

There are two possible solution

  1. We can try to expose the port of the backend container to the host. (maybe a change in the docker-compose?)
  2. We can change the implementation of (Service).RemoteImages() in backend/service.go to directly check the Storj DCS bucket instead of checking the port of the docker registry. This would make it possible to use approach 1.
 
 
   
@rahulsurwade08
Copy link

Hey @elek , I would love to contribute for this under Hacktoberfest. How can I get started?

@elek
Copy link
Owner Author

elek commented Oct 9, 2022

@rahulsurwade08 This one is the most tricky issue, but a good starting point is trying to start the full project in your local environment.

I think the easiest solution is implementing (Service).RemoteImages() with storj/uplink app. If you need more help we can organize a call and I can explain it in more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants