Creates a container. image
the name of the image we create the container from. name
is the given name of the created container. cmd
can be anything you want to run in the container, similar to run
. for instance: docker create -it tumbleweed bash
Starts container named image_name
.
Blocks a container until exits. container_name
which runs. https://docs.docker.com/engine/reference/commandline/wait/
Build a container from a Dockerfil. dockerfile_path
is the directory with the Dockerfile as well as the root of the build context. container_tag
will be the name of the container. Give timeout
if you want to change the timeout passed to assert_script_run
. Default for containers is 300.
Run a container. The method dies, if the run command fails. image_name
is required and can be the image id, the name or name with tag. If daemon
is enabled then container will run in the detached mode. Otherwise will be in the interactive mode. Set name
is you want to name the container. if cmd
found then it will execute the given command into the container. The container is always removed after exit. if keep_container
is 1 the container is not removed after creation. Default to get removed when it exits or when the daemon exits if retry
is given, the command is being repeated the given amount of times on failure If delay
is given, this defines the number of seconds between retries
Pull a container with the given image_name
where image_name
can be the name or id of the image. args
passes parameters to script_run
Return an array ref of the images
Return an array ref of the containers
Assert a property
against given expected value
if value
is given. Otherwise it prints the output of info.
Request container's logs. container
the running container. filename
file the logs are written to.
Remove a container from the pool. container_name
is the container name to be removed. Required argument. assert
Is an optional boolean for asserting that the call is successful. If false the method returns the return value of the call.
Returns true if host contains img
or false.
Updates the registry files for the running container runtime to allow access to insecure registries.
Implementation is subject to the subclass.
Remove containers and then all the images respectively. Asserts that everything was cleaned up unless c<assert> is set to 0.