github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/plugin_upgrade.md (about)

     1  # plugin upgrade
     2  
     3  <!---MARKER_GEN_START-->
     4  Upgrade an existing plugin
     5  
     6  ### Options
     7  
     8  | Name                      | Type   | Default | Description                                                           |
     9  |:--------------------------|:-------|:--------|:----------------------------------------------------------------------|
    10  | `--disable-content-trust` | `bool` | `true`  | Skip image verification                                               |
    11  | `--grant-all-permissions` |        |         | Grant all permissions necessary to run the plugin                     |
    12  | `--skip-remote-check`     |        |         | Do not check if specified remote plugin matches existing plugin image |
    13  
    14  
    15  <!---MARKER_GEN_END-->
    16  
    17  ## Description
    18  
    19  Upgrades an existing plugin to the specified remote plugin image. If no remote
    20  is specified, Docker will re-pull the current image and use the updated version.
    21  All existing references to the plugin will continue to work.
    22  The plugin must be disabled before running the upgrade.
    23  
    24  ## Examples
    25  
    26  The following example installs `vieus/sshfs` plugin, uses it to create and use
    27  a volume, then upgrades the plugin.
    28  
    29  ```console
    30  $ docker plugin install vieux/sshfs DEBUG=1
    31  
    32  Plugin "vieux/sshfs:next" is requesting the following privileges:
    33   - network: [host]
    34   - device: [/dev/fuse]
    35   - capabilities: [CAP_SYS_ADMIN]
    36  Do you grant the above permissions? [y/N] y
    37  vieux/sshfs:next
    38  
    39  $ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume
    40  
    41  sshvolume
    42  
    43  $ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello"
    44  
    45  $ docker plugin disable -f vieux/sshfs:next
    46  
    47  viex/sshfs:next
    48  
    49  # Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled
    50  $ docker volume ls
    51  
    52  DRIVER              VOLUME NAME
    53  
    54  $ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next
    55  
    56  Plugin "vieux/sshfs:next" is requesting the following privileges:
    57   - network: [host]
    58   - device: [/dev/fuse]
    59   - capabilities: [CAP_SYS_ADMIN]
    60  Do you grant the above permissions? [y/N] y
    61  Upgrade plugin vieux/sshfs:next to vieux/sshfs:next
    62  
    63  $ docker plugin enable vieux/sshfs:next
    64  
    65  viex/sshfs:next
    66  
    67  $ docker volume ls
    68  
    69  DRIVER              VOLUME NAME
    70  viuex/sshfs:next    sshvolume
    71  
    72  $ docker run -it -v sshvolume:/data alpine sh -c "ls /data"
    73  
    74  hello
    75  ```
    76  
    77  ## Related commands
    78  
    79  * [plugin create](plugin_create.md)
    80  * [plugin disable](plugin_disable.md)
    81  * [plugin enable](plugin_enable.md)
    82  * [plugin inspect](plugin_inspect.md)
    83  * [plugin install](plugin_install.md)
    84  * [plugin ls](plugin_ls.md)
    85  * [plugin push](plugin_push.md)
    86  * [plugin rm](plugin_rm.md)
    87  * [plugin set](plugin_set.md)