Skip to content

docker plugin

PluginCLI

create

create(plugin_name, plugin_data_directory, compress=False)

Create a plugin from a rootfs and configuration.

PARAMETER DESCRIPTION
plugin_name

The name you want to give to your plugin

TYPE: str

plugin_data_directory

Must contain config.json and rootfs directory.

TYPE: ValidPath

compress

Compress the context using gzip

TYPE: bool DEFAULT: False

disable

disable(plugin, force=False)

Disable a plugin

PARAMETER DESCRIPTION
plugin

The plugin to disable

TYPE: ValidPlugin

force

Force the disable of an active plugin

TYPE: bool DEFAULT: False

enable

enable(plugin, timeout=None)

Enable a plugin

PARAMETER DESCRIPTION
plugin

The plugin to enable

TYPE: ValidPlugin

timeout

HTTP client timeout (in seconds) (default 30)

TYPE: int DEFAULT: None

inspect

inspect(x)

Returns a python_on_whales.Plugin object from a string (name or id of the plugin)

PARAMETER DESCRIPTION
x

One id or hostname or a list of name or ids

TYPE: Union[str, List[str]]

Returns

One or a list of `python_on_whales.Plugin`

install

install(plugin_name, configuration={}, alias=None, disable=False, disable_content_trust=True)

Installs a Docker plugin

Warning: --grant-all-permissions is enabled, which means the program won't stop to ask you to grant the permissions.

PARAMETER DESCRIPTION
plugin_name

The name of the plugin you want to install

TYPE: str

configuration

A dict adding configuration options to the plugin

TYPE: Dict[str, str] DEFAULT: {}

alias

Local name for plugin

TYPE: Optional[str] DEFAULT: None

disable

Do not enable the plugin on install

TYPE: bool DEFAULT: False

disable_content_trust

Skip image verification (default True)

TYPE: bool DEFAULT: True

Returns

A `python_on_whales.Plugin`.

list

list()

Returns a List[python_on_whales.Plugin that are installed on the daemon.

push

push(plugin, disable_content_trust=True)

Push a plugin to a registry.

PARAMETER DESCRIPTION
plugin

The plugin to push

TYPE: ValidPlugin

disable_content_trust

Skip image signing (default True)

TYPE: bool DEFAULT: True

remove

remove(x, force=False)

Removes one or more plugins

PARAMETER DESCRIPTION
x

One or more plugins to remove.

TYPE: Union[ValidPlugin, List[ValidPlugin]]

force

Force the removal of this plugin.

TYPE: bool DEFAULT: False

set

set(plugin, configuration)

Change the settings for a plugin

PARAMETER DESCRIPTION
plugin

The plugin that needs its settings changed

TYPE: ValidPlugin

configuration

The new configuration options.

TYPE: Dict[str, str]

upgrade

upgrade(plugin, remote=None, disable_content_trust=True, skip_remote_check=False)

Upgrade a plugin

Warning: --grant-all-permissions is enabled, which means the program won't stop to ask you to grant the permissions.

PARAMETER DESCRIPTION
plugin

The plugin to upgrade

TYPE: ValidPlugin

remote

The remote to fetch the upgrade from

TYPE: Optional[str] DEFAULT: None

disable_content_trust

Skip image verification (default True)

TYPE: bool DEFAULT: True

skip_remote_check

Do not check if specified remote plugin matches existing plugin image

TYPE: bool DEFAULT: False