Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ptrm/71c745af6dcd0c4c49621dd48d65d1af to your computer and use it in GitHub Desktop.
Save ptrm/71c745af6dcd0c4c49621dd48d65d1af to your computer and use it in GitHub Desktop.
Install Docker and Docker-Compose bash completion
#!/usr/bin/env bash
set -e
echo "install docker bash completion"
curl -f -L "https://raw.githubusercontent.com/docker/docker-ce/$(docker version --format '{{.Server.Version}}' | sed -E 's/((\.?[^.]+){2}).*/\1/')/components/cli/contrib/completion/bash/docker" -o /etc/bash_completion.d/docker
echo "install docker-compose bash completion"
curl -f -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
echo ".... done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment