![]() |
Component config which holds docker run args.
Inherits From: BaseComponentConfig
tfx.orchestration.config.docker_component_config.DockerComponentConfig(
docker_server_url: Text = None,
environment: Union[Dict[Text, Text], List[Text]] = None,
name: Text = None,
privileged: bool = False,
user: Union[Text, int] = None,
volumes: Union[Dict[Text, Dict[Text, Text]], List[Text]] = None,
**kwargs
)
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
|
Methods
from_json_dict
@classmethod
from_json_dict( dict_data: Dict[Text, Any] ) -> Any
Convert from dictionary data to an object.
to_json_dict
to_json_dict() -> Dict[Text, Any]
Convert from an object to a JSON serializable dictionary.
to_run_args
to_run_args()