Skip to content

dinurp/docker-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker registry for K8S on Docker Desktop

  1. Pull the required images

    docker pull joxit/docker-registry-ui:static
    docker pull registry:2
  2. Secrets and Certificates

    • Create self-signed certificates

      gen-certs.sh
    • Create htpasswd

    • create secrets

      create-secrets.sh
  3. Deploy registry

    kubectl apply -f config/registry.yaml
    • Service for UI on nodeport 32080

    • Service for registry on nodeport 32433

    • Deployment of registry and UI

  4. Service for short DNS entry [optional]

    kubectl apply -f config/default-service.yaml
  5. Update hosts file in C:\Windows\System32\drivers\etc\. You need adminstrator rights to update the file.

    #local docker image registry
    127.0.0.1 registry.kube-public.svc.cluster.local registry.kube-public registry
  6. Trust the certificate

    • Copy the certificate to a Windows directory

      cp certs/my-registry.crt /mnt/c/Temp/
    • Open Power Shell as administrator

      Import-Certificate -FilePath C:\Temp\my-registry.crt -CertStoreLocation Cert:\LocalMachine\Root
  7. Checkout your new local registry

    • from browser visit registry UI

    • use curl from Power Shell to look at the registry api

      curl https://registry:32433/v2/_catalog | fl StatusCode, Content, Headers
    • push an image to the new registry

      docker tag registry:2 registry:32433/temp/local-registry:2
      docker push registry:32433/temp/local-registry:2
    • checkout the pushed image in registry UI

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages