Docker
get_client
is_docker_running
get_images_list
get_containers_list
get_container
Get the docker container with given name or id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_name |
str
|
Docker container id or name. |
required |
Returns:
Type | Description |
---|---|
Optional[Container]
|
Container instance if it exists, otherwise None. |
Source code in src/trecover/utils/docker.py
get_volume
Get the docker volume with given name or id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_or_name |
str
|
Volume id or name. |
required |
Returns:
Type | Description |
---|---|
Optional[Volume]
|
Volume instance if it exists, otherwise None. |
Source code in src/trecover/utils/docker.py
get_image
Get the docker image with given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Docker image name. |
required |
Returns:
Type | Description |
---|---|
Optional[Image]
|
Image instance if it exists, otherwise None. |
Source code in src/trecover/utils/docker.py
pull_image
Pull (download) the docker image with given name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Docker image name. |
required |
Returns:
Name | Type | Description |
---|---|---|
Image |
Image
|
Image instance of the pulled docker image. |