cloudoracle-cloud-infrastructure

OCI cli list custom image and usage


I am looking what OCI cli show only custom image? I HAVE TRIED

oci compute image list --compartment --all

However that not listed all my custom image, shows only handfull but for sure I have in hundreds. I can see all my custom image on GUI but not cli command only 13 image only.

Thanks


Solution

  • To filter oci custom images using --query to filter out Custom "operating-system": "Custom"

    oci compute image list --compartment-id ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxx --all --auth instance_principal --query "data[?\"operating-system\" == 'Custom']" --output table