docker plugin upgrade
Estimated reading time: 3 minutesDescription
Upgrade an existing plugin
API 1.26+
The client and daemon API must both be at least
1.26
to use this command. Use the docker version
command on the client to check
your client and daemon API versions.
Usage
docker plugin upgrade [OPTIONS] PLUGIN [REMOTE]
Options
Name, shorthand | Default | Description |
--disable-content-trust |
true |
Skip image verification |
--grant-all-permissions |
Grant all permissions necessary to run the plugin | |
--skip-remote-check |
Do not check if specified remote plugin matches existing plugin image |
Parent command
Command | Description |
---|---|
docker plugin | Manage plugins |
Related commands
Command | Description |
docker plugin create | Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory. |
docker plugin disable | Disable a plugin |
docker plugin enable | Enable a plugin |
docker plugin inspect | Display detailed information on one or more plugins |
docker plugin install | Install a plugin |
docker plugin ls | List plugins |
docker plugin push | Push a plugin to a registry |
docker plugin rm | Remove one or more plugins |
docker plugin set | Change settings for a plugin |
docker plugin upgrade | Upgrade an existing plugin |
Extended description
Upgrades an existing plugin to the specified remote plugin image. If no remote is specified, Docker will re-pull the current image and use the updated version. All existing references to the plugin will continue to work. The plugin must be disabled before running the upgrade.
Examples
The following example installs vieus/sshfs
plugin, uses it to create and use
a volume, then upgrades the plugin.
$ docker plugin install vieux/sshfs DEBUG=1
Plugin "vieux/sshfs:next" is requesting the following privileges:
- network: [host]
- device: [/dev/fuse]
- capabilities: [CAP_SYS_ADMIN]
Do you grant the above permissions? [y/N] y
vieux/sshfs:next
$ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume
sshvolume
$ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello"
$ docker plugin disable -f vieux/sshfs:next
viex/sshfs:next
# Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled
$ docker volume ls
DRIVER VOLUME NAME
$ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next
Plugin "vieux/sshfs:next" is requesting the following privileges:
- network: [host]
- device: [/dev/fuse]
- capabilities: [CAP_SYS_ADMIN]
Do you grant the above permissions? [y/N] y
Upgrade plugin vieux/sshfs:next to vieux/sshfs:next
$ docker plugin enable vieux/sshfs:next
viex/sshfs:next
$ docker volume ls
DRIVER VOLUME NAME
viuex/sshfs:next sshvolume
$ docker run -it -v sshvolume:/data alpine sh -c "ls /data"
hello