Module stakkr.docker_actions¶
Docker functions to get info about containers
-
stakkr.docker_actions.
add_container_to_network
(container: str, network: str)[source]¶ Attach a container to a network
-
stakkr.docker_actions.
block_ct_ports
(service: str, ports: list, project_name: str) → tuple[source]¶ Run iptables commands to block a list of port on a specific container
-
stakkr.docker_actions.
check_cts_are_running
(project_name: str)[source]¶ Throws an error if cts are not running
-
stakkr.docker_actions.
container_running
(container: str)[source]¶ Returns True if the container is running else False
-
stakkr.docker_actions.
get_ct_item
(compose_name: str, item_name: str)[source]¶ Get a value from a container, such as name or IP
-
stakkr.docker_actions.
get_ct_name
(container: str)[source]¶ Returns the system name of a container, generated by docker-compose
-
stakkr.docker_actions.
get_running_containers
(project_name: str) → tuple[source]¶ Get the number of running containers and theirs details for the current stakkr instance
-
stakkr.docker_actions.
get_running_containers_name
(project_name: str) → list[source]¶ Get a list of compose names of running containers for the current stakkr instance