class_docstr: Component config which holds docker run args.
  
  Attributes:
    docker_server_url: URL to the Docker server. For example,
      `unix:///var/run/docker.sock` or `tcp://127.0.0.1:1234`. Uses environment
        viarable to initialize the docker client if this parameter is not set.
        Default: `None`.
    environment: Environment variables to set inside the container, as a
      dictionary or a list of strings in the format ["SOMEVARIABLE=xxx"].
    name: The name for this container.
    privileged: Give extended privileges to this container. Default: `False`.
    remove: Remove the container when it has finished running. Default: `False`.
    user: Username or UID to run commands as inside the container.
    volumes: A dictionary to configure volumes mounted inside the container. The
      key is either the host path or a volume name, and the value is a
      dictionary with the keys: {bind: mode}.
      For example:
      `{'/home/user1': {'bind': '/mnt/vol2', 'mode': 'rw'},
       '/var/www': {'bind': '/mnt/vol1', 'mode': 'ro'}}`
    additional_run_args: Additional run args to pass to
      `docker.client.containers.run`. See
      https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.run.
class_docstr_tok: ["Component","config","which","holds","docker","run","args",".","Attributes",":","docker_server_url",":","URL","to","the","Docker","server",".","For","example",",","`","unix",":","\/\/\/var\/run\/docker.sock","`","or","`","tcp",":","\/\/127.0.0.1:1234","`",".","Uses","environment","viarable","to","initialize","the","docker","client","if","this","parameter","is","not","set",".","Default",":","`","None","`",".","environment",":","Environment","variables","to","set","inside","the","container",",","as","a","dictionary","or","a","list","of","strings","in","the","format","[","``","SOMEVARIABLE=xxx","''","]",".","name",":","The","name","for","this","container",".","privileged",":","Give","extended","privileges","to","this","container",".","Default",":","`","False","`",".","remove",":","Remove","the","container","when","it","has","finished","running",".","Default",":","`","False","`",".","user",":","Username","or","UID","to","run","commands","as","inside","the","container",".","volumes",":","A","dictionary","to","configure","volumes","mounted","inside","the","container",".","The","key","is","either","the","host","path","or","a","volume","name",",","and","the","value","is","a","dictionary","with","the","keys",":","{","bind",":","mode","}",".","For","example",":","`","{","'\/home\/user1","'",":","{","'bind","'",":","'\/mnt\/vol2","'",",","'mode","'",":","'rw","'","}",",","'\/var\/www","'",":","{","'bind","'",":","'\/mnt\/vol1","'",",","'mode","'",":","'ro","'","}","}","`","additional_run_args",":","Additional","run","args","to","pass","to","`","docker.client.containers.run","`",".","See","https",":","\/\/docker-py.readthedocs.io\/en\/stable\/containers.html","#","docker.models.containers.ContainerCollection.run","."]
code: def to_run_args(self):
      if self.additional_run_args:
          args = self.additional_run_args.copy()
      else:
          args = {}
      args.update(privileged=self.privileged)
      if self.environment:
          args.update(environment=self.environment)
      if self.name:
          args.update(name=self.name)
      if self.user:
          args.update(user=self.user)
      if self.volumes:
          args.update(volumes=self.volumes)
      return args
  
imports: from typing import Dict, List, Optional, Union
  from tfx.orchestration.config import base_component_config
label_desc: Use image node_id 2 for calling the DockerComponentConfig obj's underlying member method code with example usage: obj.to_run_args() and returns: args