Created
February 27, 2023 09:25
-
-
Save spy86/035461dab430ce7bfe70fbd7a61a3b39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "DOCKER and DOCKER-COMPOSE" | |
sudo apt-get remove docker docker-engine docker.io containerd runc | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce docker-ce-cli containerd.io -y | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/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 | |
################################################################## | |
echo "ANSIBLE" | |
sudo apt-add-repository ppa:ansible/ansible | |
sudo apt-get update | |
sudo apt-get install ansible -y | |
sudo apt-get install python python3-pip -y | |
sudo sed -i 's|[#]*PasswordAuthentication no|PasswordAuthentication yes|g' /etc/ssh/sshd_config | |
sudo sed -i 's|[#]PermitRootLogin prohibit-password|PermitRootLogin yes|g' /etc/ssh/sshd_config | |
sudo echo "[Servers]" >> /etc/ansible/hosts | |
sudo echo "127.0.0.1" >> /etc/ansible/hosts | |
sudo pip3 install docker docker-compose | |
service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment