Skip to content

cprey/harbordemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

🚢 ⛵ Harbor Demo on Minikube

Why Harbor?

  • container proxy cache (fewer errors from DockerHub)
  • store container images
  • scan container images
  • sign container images
  • store helm charts
  • distribute containers and charts
  • RBAC, quotas, push rules, intuitive UI, full API
  • potentially not allow connections to Internet for containers and charts

Use these instructions if you want to demo Harbor from a Helm chart on OSX using minikube.

Dependencies

The minikube this was tested on uses hyperkit as the VM minikube start --driver=hyperkit

minkube addons:

  • ingress

🛹 Installing Harbor using Helm

  1. add the helm chart helm repo add harbor https://helm.goharbor.io
  2. a values.yaml file was pulled from the Harbor Git repo which can be used as a good base. There were a few edits to the values.yaml mainly disabling notary.
  3. install the chart helm install harbor harbor/harbor -f values.yaml
  4. watch the action... helm status harbor or kubectl get pods -w
  5. create /etc/hosts entry for harbor. 192.168.64.2 core.harbor.domain
  6. once the harbor pods are running, you are able to log in using admin and Harbor12345 using you favorite browser.
  7. explore the UI, you're admin so you have complete control.
  8. Now that you're logged in, download the ca.crt from harbor by selecting projects-->library-->Registry Certificate. This will download a ca.crt file which you will add to your system certs keychain.
  9. configure Automatically scan images on push by choosing the Configuration tab and toggle the checkbox.
  10. restart docker

💿 create, tag, and upload docker image

  1. find some Dockerfile and built it fresh (you can also use an existing built docker image from your local repo). docker build -t footest .
  2. tag the image docker tag footest:latest core.harbor.domain/library/footest:latest
  3. log in to harbor docker login core.harbor.domain/library use admin as the user and Harbor12345 as the password
  4. push the image `docker push core.harbor.domain/library/footest:latest
  5. view the image in harbor. Select the Respositories tab and you should see an entry for image you just uploaded library/footest. Click on that link.
  6. This will take you into the Artifacts for that tag where you will see a SHA256 link of the image you just uploaded. Click on that.
  7. there is Vulnerabilities and a Build History tab. Explore them. Depending on what you pushed, you could see a bunch of issues or, perhaps it's clean.

🥥 Proxy/Cache through Harbor for DockerHub

  1. log in to Harbor repository docker login core.harbor.domain/foo
  2. pull the image as usual docker pull core.harbor.domain/dockerhub_cache_proxy/library/alpine:2.6 Subsequent image pulls will come from cache

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors