code: def main():
      args = parse_args()
      carla_image_name = args.image
      inbox_assets_path = "/home/carla/carla/Import"
      client = docker.from_env()
  
      # All possible Docker arguments are here:
      # https://docker-py.readthedocs.io/en/stable/containers.html
      container_args = {
          "image": carla_image_name,
          "user": "carla",
          "auto_remove": True,
          "stdin_open": True,
          "tty": True,
          "detach": True,
      }
  
      if args.packages:
          container_args["volumes"] = {
              args.input: {"bind": inbox_assets_path, "mode": "rw"}
          }
  
      print(bold("- ") + bold_underline("Docker arguments:"))
      print_formated_dict(container_args)
  
      try:
          print("Running Docker...")
          carla_container = client.containers.run(**container_args)
  
          if args.packages:
              # If there is packages, import them first and package them
              docker_utils.exec_command(
                  carla_container,
                  "make import",
                  user="carla",
                  verbose=args.verbose,
                  ignore_error=False,
              )
  
              docker_utils.exec_command(
                  carla_container,
                  'make package ARGS="--packages='
                  + str(args.packages)
                  + '"',
                  user="carla",
                  verbose=args.verbose,
                  ignore_error=False,
              )
          else:
              # Just create a package of the whole project
              docker_utils.exec_command(
                  carla_container,
                  "make package",
                  user="carla",
                  verbose=args.verbose,
                  ignore_error=False,
              )
  
          # Get the files routes to export
          files_to_copy = docker_utils.get_file_paths(
              carla_container,
              "/home/carla/carla/Dist/*.tar.gz",
              user="carla",
              verbose=args.verbose,
          )
  
          # Copy these files to the output folder
          docker_utils.extract_files(
              carla_container, files_to_copy, args.output
          )
  
      finally:
          print("Closing container " + carla_image_name)
          carla_container.stop()
  
file_path: carla/Util/Docker/docker_tools.py
imports: from __future__ import print_function
  import argparse
  import docker
  import docker_utils
  import os
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types