Skip to content

gufo.thor.docker

Docker utilities.

Attributes:

Name Type Description
docker

Docker singleton.

Docker

Bases: object

Docker wrapper.

logging_driver cached property

Get docker logging driver.

Returns:

Type Description
str

logging driver name.

destroy()

Destroy installation.

Returns:

Name Type Description
True bool

if command executed successfully.

False bool

otherwise.

die(msg) staticmethod

Show error message and die.

logs(*args, _follow=False)

Show logs.

restart(*args)

Perform services restart.

Returns:

Name Type Description
True bool

if command executed successfully.

False bool

otherwise.

shell()

Run shell in container.

Returns:

Name Type Description
True bool

if command executed successfully.

False bool

otherwise.

stats()

Show container stats.

Returns:

Name Type Description
True bool

if command executed successfully.

False bool

otherwise.

stop()

Perform docker compose stop.

Returns:

Name Type Description
True bool

if command executed successfully.

False bool

otherwise.

up()

Perform docker compose up -d.

Returns:

Name Type Description
True bool

if command executed successfully.

False bool

otherwise.

DockerConfig dataclass

Bases: object

Docker daemon configuration.

Attributes:

Name Type Description
logging_driver str

Current logging driver.

server_version str

Current docker server version.