Skip to content

Instantly share code, notes, and snippets.

@abdiasriver
Forked from marcosricardoss/docker-installer.sh
Created November 4, 2022 03:23
Show Gist options
  • Save abdiasriver/08ea3c942a0e54e4f4f9030c2636b541 to your computer and use it in GitHub Desktop.
Save abdiasriver/08ea3c942a0e54e4f4f9030c2636b541 to your computer and use it in GitHub Desktop.
Docker Installer
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]
then echo "please run as root"
exit
fi
VERSION="2.6.0"
# installing dependencies
apt -y update && apt install -y curl && apt install -y git
# docker and docker-compose
curl -L "https://github.com/docker/compose/releases/download/$VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
apt-get install docker-compose
# add the current user to the docker group.
groupadd docker
usermod -aG docker $USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment