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

Allow access to internal docker registry via docker CLI #38

Open
Tracked by #18555
kwiatekus opened this issue May 15, 2024 · 1 comment
Open
Tracked by #18555

Allow access to internal docker registry via docker CLI #38

kwiatekus opened this issue May 15, 2024 · 1 comment

Comments

@kwiatekus
Copy link
Contributor

Description
Expose docker registry in a way so that it is accessible via docker CLI push command.
Guide user how to configure docker CLI in order to allow accessing kyma's internal docker registry.
Provide necessary kyma cli command to expose docker registry and instruct user how to configure ~/.docker/config.json

Reasons
Developers are used to docker CLI in their daily work. Making it possible to push docker images into kyma's internal docker registry via docker push command would go hand in hand with a commonly adopted dev experience.

Attachments

https://docs.docker.com/engine/reference/commandline/cli/#docker-cli-configuration-file-configjson-properties

@pPrecel
Copy link
Contributor

pPrecel commented May 16, 2024

I've tested a bit of registry port-forwarding:

kubectl port-forward -n kyma-system  svc/dockerregistry 5002:5000

I see two ways to reach the registry server:

  • by the HTTP protocol -> to force the HTTP protocol we need to use the localhost address. for example: docker push localhost:5002/test-sleep:0.2
  • by the HTTPS protocol -> to call it like that we need to put server address/ip in the cli command. for example docker push 0.0.0.0:5002/test-sleep:0.2

In both solution we need to face problems:

  • The HTTPS protocol right now is not supported and it's described in this ticket. Actual output:

    docker push 0.0.0.0:5002/test-sleep:0.2
    
    The push refers to repository [0.0.0.0:5002/test-sleep]
    Get "https://0.0.0.0:5002/v2/": http: server gave HTTP response to HTTPS client
    
  • The HTTP protocol is fully supported right now, but docker-cli is not compatible with the kubectl port-forward command and we need to investigate and face the following error:

    docker push localhost:5002/test-sleep:0.2
    
    The push refers to repository [localhost:5002/test-sleep]
    Get "http://localhost:5002/v2/": dial tcp [::1]:5002: connect: connection refused
    

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

No branches or pull requests

2 participants