github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/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  <!-- This file is maintained within the docker/cli GitHub
     8       repository at https://github.com/docker/cli/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # plugin upgrade
    17  
    18  ```markdown
    19  Usage:  docker plugin upgrade [OPTIONS] PLUGIN [REMOTE]
    20  
    21  Upgrade a plugin
    22  
    23  Options:
    24        --disable-content-trust   Skip image verification (default true)
    25        --grant-all-permissions   Grant all permissions necessary to run the plugin
    26        --help                    Print usage
    27        --skip-remote-check       Do not check if specified remote plugin matches existing plugin image
    28  ```
    29  
    30  ## Description
    31  
    32  Upgrades an existing plugin to the specified remote plugin image. If no remote
    33  is specified, Docker will re-pull the current image and use the updated version.
    34  All existing references to the plugin will continue to work.
    35  The plugin must be disabled before running the upgrade.
    36  
    37  ## Examples
    38  
    39  The following example installs `vieus/sshfs` plugin, uses it to create and use
    40  a volume, then upgrades the plugin.
    41  
    42  ```bash
    43  $ docker plugin install vieux/sshfs DEBUG=1
    44  
    45  Plugin "vieux/sshfs:next" is requesting the following privileges:
    46   - network: [host]
    47   - device: [/dev/fuse]
    48   - capabilities: [CAP_SYS_ADMIN]
    49  Do you grant the above permissions? [y/N] y
    50  vieux/sshfs:next
    51  
    52  $ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume
    53  
    54  sshvolume
    55  
    56  $ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello"
    57  
    58  $ docker plugin disable -f vieux/sshfs:next
    59  
    60  viex/sshfs:next
    61  
    62  # Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled
    63  $ docker volume ls
    64  
    65  DRIVER              VOLUME NAME
    66  
    67  $ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next
    68  
    69  Plugin "vieux/sshfs:next" is requesting the following privileges:
    70   - network: [host]
    71   - device: [/dev/fuse]
    72   - capabilities: [CAP_SYS_ADMIN]
    73  Do you grant the above permissions? [y/N] y
    74  Upgrade plugin vieux/sshfs:next to vieux/sshfs:next
    75  
    76  $ docker plugin enable vieux/sshfs:next
    77  
    78  viex/sshfs:next
    79  
    80  $ docker volume ls
    81  
    82  DRIVER              VOLUME NAME
    83  viuex/sshfs:next    sshvolume
    84  
    85  $ docker run -it -v sshvolume:/data alpine sh -c "ls /data"
    86  
    87  hello
    88  ```
    89  
    90  ## Related commands
    91  
    92  * [plugin create](plugin_create.md)
    93  * [plugin disable](plugin_disable.md)
    94  * [plugin enable](plugin_enable.md)
    95  * [plugin inspect](plugin_inspect.md)
    96  * [plugin install](plugin_install.md)
    97  * [plugin ls](plugin_ls.md)
    98  * [plugin push](plugin_push.md)
    99  * [plugin rm](plugin_rm.md)
   100  * [plugin set](plugin_set.md)