Docker

Angreal’s docker integration is provided docker-pyo3.

The best way to understand the bindings and interface is to look at the tests in the associated project.

The following objects and namespaces are available.

from angreal.integrations.docker import Docker
from angreal.integrations.docker.container import Containers, Container
from angreal.integrations.docker.network   import Network, Networks
from angreal.integrations.docker.image     import Image, Images
from angreal.integrations.docker.volume    import Volume, Volumes

Basic usage :

#Connect to the client
d = Docker()

#build an image from a dockerfile
docker.images().build(path=here,dockerfile='Dockerfile',tag='test-image')

#get the image we built
image = docker.images().get('test-image')

#create a container from the image

docker.containers().create(image="test-image",name="container-test-image")