Skip to content

Latest commit

 

History

History
72 lines (41 loc) · 2.44 KB

README.md

File metadata and controls

72 lines (41 loc) · 2.44 KB

simple-scanner (alpha)

This repository is project that allows for building and scanning images locally. This project is in the alpha stage and should not be deployed into production environments since it uses insecure tools, like the default docker registry. This deployment should be able to run offline after the trivy vulnerability data base in loaded, future support will include offline deployment.

Docker Compose

There is a default docker-compose.yaml file included in this repository that is ready to deploy. The file can be modified or updated to include any custom changes.

services

  1. registry - based on Docker Registry UI

  2. mattermost-preview - x

  3. trivy - built from Alpine trivy

deploy

To deploy this alpha setup using docker compose run docker compose up -d. Note that docker-compose is not used in this case.

usage

Tag images with the localhost:5000 registry and push to the registry after the deployment is up and running.

Inside of the trivy container run trivy image localhost:5000/<image-name>:<image-tag> --insecure to scan the image for vulnerabilities. To view other trivy capabilities simply run trivy or trivy --help.

Kubernetes [not tested]

required software packages

  1. k3s x

  2. docker x

  3. kubectl x

  4. helm x

applications

  • mattermost
  • trivy
  • docker registry

future goals

  1. Install k3s with podman instead of docker
  2. Support offline kubernetes deployment
  3. Link mattermost to trivy using cronjobs or listeners
  4. Switch to using a secure docker registry

cluster setup instructions

WSL (Ubuntu) setup

This setup was tested using WSL with Ubuntu on Windows 11.

  • install all required software packages
  • copy /etc/rancher/k3s/k3s.yaml to ~/.kube/config
  • verify kubectl can access the cluster

create namespcaes

Created namesapces called trivy, mattermost, and registry

kubectl create ns <NAMESPACE>

install helm charts

Follow the instructions found in ./helm/helm.md