vantage6.common.docker.addons#

Functions

check_docker_running()

Check if docker engine is running.

delete_network(network[, kill_containers])

Delete network and optionally its containers

delete_volume_if_exists(client, volume_name)

Delete a volume if it exists

get_container(docker_client, **filters)

Return container if it exists after searching using kwargs

get_network(docker_client, **filters)

Return network if it exists after searching using kwargs

get_networks_of_container(container)

Get list of networks the container is in

get_num_nonempty_networks(container)

Get number of networks the container is in where it is not the only one

get_server_config_name(container_name, scope)

Get the configuration name of a server from its docker container name

pull_image(docker_client, image)

Pull a docker image

remove_container(container[, kill])

Removes a docker container

remove_container_if_exists(docker_client, ...)

Kill and remove a docker container if it exists

running_in_docker()

Check if this code is executed within a Docker container.

stop_container(container[, force])

Stop a docker container

Classes

ContainerKillListener()

Listen for signals that the docker container should be shut down