Deploy on Docker
Prerequisites
- Install Docker.
Deployment steps
To run OpenClarity in Docker on a local machine, complete the following steps.
-
Download the latest OpenClarity release.
wget https://github.com/openclarity/openclarity/releases/download/v1.1.0/docker-compose-v1.1.0.tar.gz
-
Create a new directory, extract the files and navigate to the directory.
mkdir docker-compose-v1.1.0 tar -xvzf docker-compose-v1.1.0.tar.gz -C docker-compose-v1.1.0 cd docker-compose-v1.1.0
-
Start every control plane element with the docker compose file.
docker compose --project-name openclarity --file docker-compose.yml up -d --wait --remove-orphans
The output should be similar to:
[+] Running 14/14 ⠿ Network openclarity Created 0.2s ⠿ Volume "openclarity_grype-server-db" Created 0.0s ⠿ Volume "openclarity_apiserver-db-data" Created 0.0s ⠿ Container openclarity-orchestrator-1 Healthy 69.7s ⠿ Container openclarity-yara-rule-server-1 Healthy 17.6s ⠿ Container openclarity-exploit-db-server-1 Healthy 17.7s ⠿ Container openclarity-swagger-ui-1 Healthy 7.8s ⠿ Container openclarity-trivy-server-1 Healthy 26.7s ⠿ Container openclarity-uibackend-1 Healthy 17.6s ⠿ Container openclarity-ui-1 Healthy 7.7s ⠿ Container openclarity-freshclam-mirror-1 Healthy 7.8s ⠿ Container openclarity-grype-server-1 Healthy 37.3s ⠿ Container openclarity-gateway-1 Healthy 7.7s ⠿ Container openclarity-apiserver-1 Healthy 17.7s
Please note that the
image_override.env
file enables you to use the images you build yourself. You can override parameters in thedocker-compose.yml
by passing a custom env file to thedocker compose up
command via the--env-file
flag. The/installation/docker/image_override.env
file contains an example overriding all the container images. -
Check the running containers in the Docker desktop.
-
Access the OpenClarity UI. Navigate to http://localhost:8080/ in your browser.
Next steps
Complete the First Tasks on the UI.
Clean up steps
-
After you’ve finished your tasks, stop the running containers.
docker compose --project-name openclarity --file docker-compose.yml down --remove-orphans