Scanning Pods with Anchore, Jenkins, Minikube, Windows

  1. Install Jenkins in our Minikube / Windows 10 setup.
  2. Install Anchore
  3. Configure Jenkins plugins
  4. Set up a freestyle pipeline job to build, push and scan a custom container image
  • A working instance of Minikube
  • Helm
  • Internet access
  • Dockerhub account (optional)

Installing Jenkins on Minikube / Windows 10

minikube ssh
id docker
This varies depending on which driver you are using — this one is using vm-driver=hyperv
sudo groupmod -g 1000 docker
This varies depending on which driver you are using — this one is using vm-driver=docker
ls -l /var/run/docker.sock
group is 999
sudo chown root:1000 /var/run/docker.sock
The group is now “docker” since we changed the group id to 1000
sudo mkdir -p /data/jenkins-home 
sudo chown docker:1000 -R /data
ls -l /data
exit
/data/Jenkins-home permissions should look like this
git clone https://github.com/airwavetechio/jenkins-demo
cd jenkins-demo
kubectl apply -f prereqs
kubectl apply -f deployment.yaml
kubectl get pods -n Jenkins

Install Anchore

helm repo add anchore https://charts.anchore.io
helm install anchore-demo anchore/anchore-engine
A snippet of the Helm installation
kubectl get deployments

Configure Jenkins plugins

kubectl --namespace jenkins port-forward svc/jenkins 8080:8080

Configure Anchore

Configure the Docker Builder

Test the connection

Don’t forget to click Save at the bottom.

Set up a freestyle pipeline job to build a custom container image

Clone > Build > Push > Scan

Setting up the Freestyle Job

helm uninstall anchore-demo
kubectl delete -f deployment.yaml
kubectl delete -f prereqs

--

--

--

Helping you build the hardest parts of your Stack

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CSS Documentation-How to make it perfect

Nervos CKB Development Update #40

Nervos CKB Development Update #40

Your First Web Developer Portfolio

Portfolio

Keep your AI Architecture Competitive with Open Challenges

How to Use JSON in Python

Threat Hunting with Data Science: Registry Run Keys

How To Create Security Cameras For Your Game

Check out this collection on opensea https://opensea.io/assets/matic/0x9f8fbce530320468831c200a49dfc

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
AirwaveTech

AirwaveTech

Helping you build the hardest parts of your Stack

More from Medium

Containers & Containerization

Java web app containerization and migration to Azure Kubernetes Service

Principles and patterns — A tale of infrastructure as code