Last active
April 2, 2024 12:41
-
-
Save toschneck/2df90c66e0f8d4c6567d69a36bfc5bcd to your computer and use it in GitHub Desktop.
Install Docker and Docker-Compose bash completion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
echo "install docker bash completion" | |
curl -L https://raw.githubusercontent.com/docker/docker/v$(docker version --format '{{.Server.Version}}')/contrib/completion/bash/docker -o /etc/bash_completion.d/docker | |
echo "install docker-compose bash completion" | |
curl -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!" |
nstall docker-compose bash completion
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 14 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /etc/bash_completion.d/docker-compose: No
Warning: such file or directory
100 14 100 14 0 0 90 0 --:--:-- --:--:-- --:--:-- 89
curl: (23) Failed writing body (0 != 14)
dolboeb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first link is broken, looks like the completion file now sits in the
docker/cli
repo. Here's the updated URL:Note I pipped sed to remove anything after the hyphen on the version number. E.g:
19.03.13-ce
->19.03.13
.