code: func NewImagesCommand(dockerCli command.Cli) *cobra.Command {
  	options := imagesOptions{filter: opts.NewFilterOpt()}
  
  	cmd := &cobra.Command{
  		Use:   "images [OPTIONS] [REPOSITORY[:TAG]]",
  		Short: "List images",
  		Args:  cli.RequiresMaxArgs(1),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			if len(args) > 0 {
  				options.matchName = args[0]
  			}
  			return runImages(dockerCli, options)
  		},
  	}
  
  	flags := cmd.Flags()
  
  	flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only show numeric IDs")
  	flags.BoolVarP(&options.all, "all", "a", false, "Show all images (default hides intermediate images)")
  	flags.BoolVar(&options.noTrunc, "no-trunc", false, "Don't truncate output")
  	flags.BoolVar(&options.showDigests, "digests", false, "Show digests")
  	flags.StringVar(&options.format, "format", "", "Pretty-print images using a Go template")
  	flags.VarP(&options.filter, "filter", "f", "Filter output based on conditions provided")
  
  	return cmd
  }
docs: // NewImagesCommand creates a new `docker images` command