Skip to content

Instantly share code, notes, and snippets.

@Yediyarov
Created June 27, 2020 10:44
Show Gist options
  • Save Yediyarov/e006b8073f42dde3bd23ea7038cd3f58 to your computer and use it in GitHub Desktop.
Save Yediyarov/e006b8073f42dde3bd23ea7038cd3f58 to your computer and use it in GitHub Desktop.
#!/bin/sh
DOCKER_COMPOSE_V=1.24.0
# Install Docker
# ref: https://github.com/docker/docker-install
# wget -qO- https://get.docker.com/ | sh
curl -fsSL get.docker.com -o get-docker.sh
bash get-docker.sh
# Install docker-compose
# ref: https://github.com/docker/compose/releases
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_V}/docker-compose-`uname -s`-`uname -m` > ./docker-compose
sudo mv ./docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
# Install docker-cleanup command
# ref: https://gist.github.com/msadig/1f113c3f88cefa91171eefa0c6815335
curl -L https://gist.github.com/Yediyarov/c3067fdf20bcbc34ed425e7c3db7c0d6/raw > ./docker-cleanup
sudo mv docker-cleanup /usr/local/bin/docker-cleanup
sudo chmod +x /usr/local/bin/docker-cleanup
# Set Docker to start automatically at boot time
sudo usermod -aG docker $(whoami)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment