Skip to content

Instantly share code, notes, and snippets.

@dnnnp
Last active January 22, 2022 12:43
Show Gist options
  • Save dnnnp/3fcac04586d8cb44d519842cf30957dc to your computer and use it in GitHub Desktop.
Save dnnnp/3fcac04586d8cb44d519842cf30957dc to your computer and use it in GitHub Desktop.
#!/bin/bash
# based on https://gist.githubusercontent.com/EvgenyOrekhov/1ed8a4466efd0a59d73a11d753c0167b/raw/fe4b33e0ca5ec741630b83e22c0ee35dd67fc071/install-docker.sh
sudo apt --yes --no-install-recommends install apt-transport-https ca-certificates
wget --quiet --output-document=- https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release --codename --short) stable"
sudo apt --yes --no-install-recommends install docker-ce docker-ce-cli containerd.io
curl -sLo /usr/local/bin/docker-compose "https://github.com/docker/compose/releases/download/$(curl -sL https://api.github.com/repos/docker/compose/releases/latest | grep --perl-regexp --only-matching '"tag_name": "\K.*?(?=")')/docker-compose-Linux-x86_64"
chmod +x /usr/local/bin/docker-compose
# completion currently not available
#curl -sLo /etc/bash_completion.d/docker-compose "https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment