panther_cli_click
¤
append_to_hosts_file
¤
append_to_hosts_file(entry)
Append a new entry to the /etc/hosts file.
Source code in panther/panther_cli_click.py
240 241 242 243 244 245 246 247 |
|
container_exists
¤
container_exists(client, container_name)
Check if the Docker container exists.
Source code in panther/panther_cli_click.py
208 209 210 211 212 213 214 215 216 217 |
|
create_network
¤
create_network(client, network_name, gateway, subnet)
Create a Docker network with the specified gateway and subnet.
Source code in panther/panther_cli_click.py
286 287 288 289 290 291 292 293 294 295 296 |
|
get_container_ip
¤
get_container_ip(client, container_name)
Get the IP address of the Docker container.
Source code in panther/panther_cli_click.py
220 221 222 223 224 225 226 227 228 |
|
get_nproc
¤
get_nproc()
Get the number of processors available.
Source code in panther/panther_cli_click.py
671 672 673 674 675 676 677 678 |
|
log_docker_output
¤
log_docker_output(generator, task_name: str = 'docker command execution') -> None
Log output to console from a generator returned from docker client :param Any generator: The generator to log the output of :param str task_name: A name to give the task, i.e. 'Build database image', used for logging
Source code in panther/panther_cli_click.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
|
monitor_docker_usage
¤
monitor_docker_usage(container_name, interval=1.0, duration=10.0)
Monitor the CPU and memory usage of a Docker container.
:param container_name: Name or ID of the Docker container to monitor :param interval: Time interval (in seconds) between checks :param duration: Total duration (in seconds) to monitor
Source code in panther/panther_cli_click.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
|
network_exists
¤
network_exists(client, network_name)
Check if the Docker network exists.
Source code in panther/panther_cli_click.py
274 275 276 277 278 279 280 281 282 283 |
|
restore_hosts_file
¤
restore_hosts_file()
Restore the original /etc/hosts file from the backup.
Source code in panther/panther_cli_click.py
231 232 233 234 235 236 237 |
|
start_bash_container
¤
start_bash_container(implem)
Start a Docker container with the specified parameters.
Source code in panther/panther_cli_click.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 |
|