MCPcopy Index your code
hub / github.com/docker/docker-py / create

Method create

docker/models/plugins.py:134–150  ·  view source on GitHub ↗

Create a new plugin. Args: name (string): The name of the plugin. The ``:latest`` tag is optional, and is the default if omitted. plugin_data_dir (string): Path to the plugin data directory. Plugin data

(self, name, plugin_data_dir, gzip=False)

Source from the content-addressed store, hash-verified

132 model = Plugin
133
134 def create(self, name, plugin_data_dir, gzip=False):
135 """
136 Create a new plugin.
137
138 Args:
139 name (string): The name of the plugin. The ``:latest`` tag is
140 optional, and is the default if omitted.
141 plugin_data_dir (string): Path to the plugin data directory.
142 Plugin data directory must contain the ``config.json``
143 manifest file and the ``rootfs`` directory.
144 gzip (bool): Compress the context using gzip. Default: False
145
146 Returns:
147 (:py:class:`Plugin`): The newly created plugin.
148 """
149 self.client.api.create_plugin(name, plugin_data_dir, gzip)
150 return self.get(name)
151
152 def get(self, name):
153 """

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
create_pluginMethod · 0.80

Tested by

no test coverage detected