listing the gcp images in the marketplace from the

2019-07-25 09:38发布

问题:

How to list the gcp images in the marketplace from the gcloud commandline? "gcloud compute images list" only shows the standard images in the project and probably skips the marketplace listing.

回答1:

By default, the cli shows standard images only.

    --standard-images
      Show images from well-known image projects. The well known image
      projects are: centos-cloud, coreos-cloud, debian-cloud, cos-cloud,
      rhel-cloud, rhel-sap-cloud, suse-cloud, suse-sap-cloud,
      ubuntu-os-cloud, windows-cloud, windows-sql-cloud. Enabled by default,
      use --no-standard-images to disable.

To list images from specific project you want to specify --project flag. Example:

# gcloud compute images list --project=click-to-deploy-images --filter="name ~ 'nginx.*'"