Skip to content

Instantly share code, notes, and snippets.

@Sayegh7
Created November 28, 2019 14:14
Show Gist options
  • Select an option

  • Save Sayegh7/e1b3b02c451a6e4ddf33f94dea39a9fd to your computer and use it in GitHub Desktop.

Select an option

Save Sayegh7/e1b3b02c451a6e4ddf33f94dea39a9fd to your computer and use it in GitHub Desktop.
Install docker and docker compose (assumes sudo)
wget -qO- https://get.docker.com/ | sh
# Install docker-compose
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | tail -n 1`
sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
chmod +x /usr/local/bin/docker-compose
sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
# Install docker-cleanup command
cd /tmp
git clone https://gist.github.com/76b450a0c986e576e98b.git
cd 76b450a0c986e576e98b
mv docker-cleanup /usr/local/bin/docker-cleanup
chmod +x /usr/local/bin/docker-cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment