bash: script: docker / docker-compose quick start
Quick installation of docker / docker-compose
Save a LOT of time with this quick init script. Install docker / docker-compose inside CentOS, or Ubuntu / Debian.
Centos
echo "sudo yum update -y && sudo yum upgrade -y"
sleep 2
sudo yum update -y && sudo yum upgrade -y
echo "sudo yum install epel-release"
sleep 2
sudo yum install epel-release -y
sudo yum install htop -y
echo "installing docker-compose"
echo "sudo yum install -y yum-utils htop nmap bind-utils"
sleep 2
sudo yum install -y yum-utils htop nmap zip lynx bind-utils unzip
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
echo "sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y"
sleep 2
sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
echo "sudo systemctl enable docker"
sleep 2
sudo systemctl enable docker
echo "sudo systemctl start docker"
sleep 2
sudo systemctl start docker
echo "sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compo$
sleep 2
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(u$
echo "sudo chmod +x /usr/local/bin/docker-compose"
sleep 2
sudo chmod +x /usr/local/bin/docker-compose
Ubuntu / Debian Based: From digitaloceans guide at link
echo "sudo apt update -y && sudo apt upgrade -y"
sleep 2
sudo apt update -y && sudo apt upgrade -y
echo "sudo apt-get install curl gnupg ca-certificates lsb-release"
sleep 2
sudo apt-get install curl gnupg ca-certificates lsb-release docker.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Once you have saved these to a file aka run_me.sh enable chmod permissions with:
chmod +x run_me.sh
After this you will probably want to do:
systemctl enable docker && systemctl start docker