This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Deploy on Docker

Prerequisites

Deployment steps

To run VMClarity in Docker on a local machine, complete the following steps.

  1. Download the latest VMClarity release.

    wget https://github.com/openclarity/vmclarity/releases/download/v0.6.0/docker-compose-v0.6.0.tar.gz
    
  2. Create a new directory, extract the files and navigate to the directory.

    mkdir docker-compose-v0.6.0
    tar -xvzf docker-compose-v0.6.0.tar.gz -C docker-compose-v0.6.0
    cd docker-compose-v0.6.0
    
  3. Start every control plane element with the docker compose file.

    docker compose --project-name vmclarity --file docker-compose.yml up -d --wait --remove-orphans
    

    The output should be similar to:

    [+] Running 14/14
    ⠿ Network vmclarity                        Created                                                       0.2s
    ⠿ Volume "vmclarity_grype-server-db"       Created                                                       0.0s
    ⠿ Volume "vmclarity_apiserver-db-data"     Created                                                       0.0s
    ⠿ Container vmclarity-orchestrator-1       Healthy                                                      69.7s
    ⠿ Container vmclarity-yara-rule-server-1   Healthy                                                      17.6s
    ⠿ Container vmclarity-exploit-db-server-1  Healthy                                                      17.7s
    ⠿ Container vmclarity-swagger-ui-1         Healthy                                                       7.8s
    ⠿ Container vmclarity-trivy-server-1       Healthy                                                      26.7s
    ⠿ Container vmclarity-uibackend-1          Healthy                                                      17.6s
    ⠿ Container vmclarity-ui-1                 Healthy                                                       7.7s
    ⠿ Container vmclarity-freshclam-mirror-1   Healthy                                                       7.8s
    ⠿ Container vmclarity-grype-server-1       Healthy                                                      37.3s
    ⠿ Container vmclarity-gateway-1            Healthy                                                       7.7s
    ⠿ Container vmclarity-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 the docker-compose.yml by passing a custom env file to the docker compose up command via the --env-file flag. The /installation/docker/image_override.env file contains an example overriding all the container images.

  4. Check the running containers in the Docker desktop.

  5. Access the VMClarity UI. Navigate to http://localhost:8080/ in your browser.

Next steps

Complete the First tasks on the UI.

Stop the containers

  1. After you’ve finished your tasks, stop the running containers.

    docker compose --project-name vmclarity --file docker-compose.yml down --remove-orphans