Export is the entry point for exporting docker images.

def _export(self, args, **extra_args):
        """
        Export is the entry point for exporting docker images.
        """
        if not isinstance(args, argparse.Namespace):
            raise TypeError(logger.error("args should of an instance of argparse.Namespace"))

        # Warn the consumer about unsafe Docker Practices
        if args.no_validation:
            logger.warning("#######################################################\n"
                           "Validation has been disabled for this export operation.\n"
                           "This is an unsafe operation and does not verify the "
                           "run time nature of the container.\n"
                           "Any docker image created in this manner will not "
                           "be verified to start. Do not ship broken code.\n"
                           "#######################################################\n",
                           extra={'formatter': 'cli-warning'})

            # Require the consumer to verify their actions
            if not args.y:
                validation_input = six.moves.input("Please type \'yes\' to export the container without validation: ")

                if not (isinstance(validation_input, six.string_types) and ('yes' == validation_input)):
                    raise ValueError("Incorrect type defined. Required value: yes")

        # create new freight forwarder to create a commercial_invoice and export goods.
        freight_forwarder = FreightForwarder()

        # create commercial invoice this is the contact given to freight forwarder dispatch containers and images
        commercial_invoice = freight_forwarder.commercial_invoice(
            'export',
            args.data_center,
            args.environment,
            args.service,
            tagging_scheme=not args.no_tagging_scheme
        )

        # create commercial_invoice
        bill_of_lading = freight_forwarder.export(
            commercial_invoice,
            clean=args.clean,
            configs=args.configs,
            tags=args.tag,
            test=args.test,
            use_cache=args.use_cache,
            validate=not args.no_validation
        )

        # pretty lame... Need to work on return values through to app to make them consistent.
        exit_code = 0 if bill_of_lading else 1

        if exit_code != 0:
            exit(exit_code)