create

docker.plugin.create(plugin_name, plugin_data_directory, compress=False)

Create a plugin from a rootfs and configuration.

Arguments

  • plugin_name str: The name you want to give to your plugin
  • plugin_data_directory Union[str, pathlib.Path]: Must contain config.json and rootfs directory.
  • compress bool: Compress the context using gzip

disable

docker.plugin.disable(plugin, force=False)

Disable a plugin

Arguments

  • plugin Union[python_on_whales.Plugin, str]: The plugin to disable
  • force bool: Force the disable of an active plugin

enable

docker.plugin.enable(plugin, timeout=None)

Enable a plugin

Arguments

  • plugin Union[python_on_whales.Plugin, str]: The plugin to enable
  • timeout Optional[int]: HTTP client timeout (in seconds) (default 30)

inspect

docker.plugin.inspect(x)

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

Arguments

  • x Union[str, List[str]]: One id or hostname or a list of name or ids

Returns

One or a list of python_on_whales.Plugin


install

docker.plugin.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.

Arguments

  • plugin_name str: The name of the plugin you want to install
  • configuration Dict[str, str]: A dict adding configuration options to the plugin
  • alias Optional[str]: Local name for plugin
  • disable bool: Do not enable the plugin on install
  • disable_content_trust bool: Skip image verification (default True)

Returns

A python_on_whales.Plugin.


list

docker.plugin.list()

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


push

docker.plugin.push(plugin, disable_content_trust=True)

Push a plugin to a registry.

Arguments

  • plugin Union[python_on_whales.Plugin, str]: The plugin to push
  • disable_content_trust bool: Skip image signing (default True)

remove

docker.plugin.remove(x, force=False)

Removes one or more plugins

Arguments

  • plugin: One or more plugins to remove.
  • force bool: Force the removal of this plugin.

set

docker.plugin.set(plugin, configuration)

Change the settings for a plugin

Arguments

  • plugin Union[python_on_whales.Plugin, str]: The plugin that needs its settings changed
  • configuration Dict[str, str]: The new configuration options.

upgrade

docker.plugin.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.

Arguments

  • plugin Union[python_on_whales.Plugin, str]: The plugin to upgrade
  • remote Optional[str]: The remote to fetch the upgrade from
  • disable_content_trust bool: Skip image verification (default True)
  • skip_remote_check bool: Do not check if specified remote plugin matches existing plugin image