create
docker.context.create()
Not yet implemented
inspect
docker.context.inspect(x=None)
Returns the context object. If no argument is provided, returns the current context.
list
docker.context.list()
List all Docker contexts available
Returns
List[python_on_whales.Context]
remove
docker.context.remove(x, force=False)
Removes one or more contexts
Arguments
- x
Union[python_on_whales.components.context.cli_wrapper.Context, str, List[Union[python_on_whales.components.context.cli_wrapper.Context, str]]]
: One or more contexts, empty list means no-op. - force
bool
: Force the removal of this context
update
docker.context.update()
Not yet implemented
use
docker.context.use(context)
Set the default context
Arguments
- context
Union[python_on_whales.components.context.cli_wrapper.Context, str]
: The context to set as default