Choose the method that best fits your environment.
Pin to a release tag (recommended — avoids fetching from an unpinned master branch):
curl -fsSL https://raw.githubusercontent.com/webcane/docker-deploy/v1.0.1/install.sh | shOr to select a specific version at install time:
curl -fsSL https://raw.githubusercontent.com/webcane/docker-deploy/master/install.sh | INSTALL_VERSION=v1.0.1 shmacOS
brew tap webcane/docker-deploy
brew install docker-deployDocker does not search /opt/homebrew/lib/docker/cli-plugins by default. After installing, make the plugin visible via one of:
Option 1 — symlink into your CLI plugins directory:
mkdir -p ~/.docker/cli-plugins
ln -sf /opt/homebrew/opt/docker-deploy/bin/docker-deploy ~/.docker/cli-plugins/docker-deployOption 2 — add Homebrew's plugin directory to ~/.docker/config.json:
"cliPluginsExtraDirs": ["/opt/homebrew/lib/docker/cli-plugins"]- Go to the releases page and download the archive for your OS and architecture (e.g.
docker-deploy_linux_amd64.tar.gz). - Extract the archive, move the binary to
~/.docker/cli-plugins/, and make it executable:
tar -xzf docker-deploy_linux_amd64.tar.gz
mkdir -p ~/.docker/cli-plugins
mv docker-deploy ~/.docker/cli-plugins/docker-deploy
chmod +x ~/.docker/cli-plugins/docker-deployReplace linux_amd64 with your OS and architecture (e.g. darwin_arm64 for Apple Silicon).
macOS only: macOS Gatekeeper will block the binary because it is not Apple-notarized. Remove the quarantine attribute after install:
xattr -d com.apple.quarantine ~/.docker/cli-plugins/docker-deployGOBIN=$HOME/.docker/cli-plugins go install github.com/webcane/docker-deploy/cmd/docker-deploy@latestGOBIN must be set to $HOME/.docker/cli-plugins — Docker CLI plugins must live in that directory, not in the standard $GOPATH/bin. Without GOBIN, docker deploy will not be discoverable by the Docker CLI.
Shell completions are provided for bash and zsh. They complete flag names (e.g. --host, --path, --compose-file) and subcommand names for the docker deploy command.
If you installed via Homebrew, completions are set up automatically — no extra steps needed.
brew tap webcane/docker-deploy
brew install docker-deployzsh: The completion file is installed to Homebrew's share/zsh/site-functions/ directory, which is already on $FPATH on Homebrew-managed macOS. Restart your shell or run compinit to activate:
autoload -Uz compinit && compinitbash: The completion file is installed to share/bash-completion/completions/. This directory is loaded automatically by the bash-completion package. If you do not have it installed yet:
brew install bash-completion@2After installing bash-completion@2, add the following to your ~/.bashrc or ~/.bash_profile if it is not already present (check your existing profile — Homebrew prints the snippet during install):
[[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh"For non-Homebrew installs, use the contrib/install-completions.sh script from the release. The script auto-detects your shell (bash or zsh) and installs the matching completion file.
Pinned to a release tag (recommended):
curl -fsSL https://raw.githubusercontent.com/webcane/docker-deploy/v1.0.1/contrib/install-completions.sh | shOr from the latest master (less stable):
curl -fsSL https://raw.githubusercontent.com/webcane/docker-deploy/master/contrib/install-completions.sh | shThe script installs to the standard system completion directories when it can. If system directories are not writable, it falls back to user-level directories and prints the one-line snippet you need to add to your shell profile:
-
zsh fallback:
~/.zsh/completions/— add to~/.zshrc:fpath=(~/.zsh/completions $fpath) autoload -Uz compinit && compinit
-
bash fallback:
~/.bash_completion.d/— add to~/.bashrc:source ~/.bash_completion.d/docker-deploy.bash
After installation, open a new shell and confirm completions are active:
docker deploy --<TAB>You should see flag names listed, for example --compose-file, --host, --path, and others.