github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/docs/reference/commandline/plugin_upgrade.md (about)

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