A simple CLI plugin (created mainly to test the capabilities of the go docker cli plugin api) which allows to push and tag images with multiple arguments in one command!
Ever found the following annoying?
docker tag myimage:latest myimage:1.0.1.1.0
docker tag myimage:latest myimage:1.0.1.1
docker tag myimage:latest myimage:1.0.1
docker tag myimage:latest myimage:1.0
docker tag myimage:latest myimage:1
docker push myimage:latest
docker push myimage:1.0.1.1.0
docker push myimage:1.0.1.1
docker push myimage:1.0.1
docker push myimage:1.0
docker push myimage:1
Well, with the multi
cli plugin, you could instead do this!
docker multi tag myimage:latest myimage:1.0.1.1.0 myimage:latest myimage:1.0.1.1 myimage:latest myimage:1.0.1 myimage:latest myimage:1.0 myimage:latest myimage:1
docker multi push myimage:latest myimage:1.0.1.1.0 myimage:latest myimage:1.0.1.1 myimage:latest myimage:1.0.1 myimage:latest myimage:1.0 myimage:latest myimage:1
Awesome right?!
Either build the code yourself or download one of the binaries from the releases
tab on github.
Rename the plugin file to docker-multi
and place it in the ~/.docker/cli-plugins
directory (or %HOMEPATH%\.docker\cli-plugins
on windows).
MULTI_VERSION=v0.0.3 # Change to version you want to download.
MULTI_ARCH=amd64-linux # Change to your arch and os
PLUGINS=$HOME/.docker/cli-plugins
mkdir -p $PLUGINS
curl -L "https://github.com/jitesoft/docker-multi-plugin/releases/download/${MULTI_VERSION}/docker-multi-plugin-${MULTI_ARCH}.tar.gz" | tar zx -C $PLUGINS/
chmod +x $PLUGINS/docker-multi
Run docker docker multi --help
.
Done!
MIT
No warranty, no liability.