Add install script.
This commit is contained in:
parent
6c6888ec40
commit
ec9f403479
67
install.sh
Normal file
67
install.sh
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Make sure we ae on Ubuntu 22.04
|
||||||
|
version=$(lsb_release -r | awk '{print $2}')
|
||||||
|
|
||||||
|
# Check if the version is 22.04
|
||||||
|
if [ "$version" != "22.04" ]
|
||||||
|
then
|
||||||
|
# If the version is not 22.04, print an error message and exit
|
||||||
|
>&2 echo "Error: This script is only compatible with Ubuntu 22.04. You are running version $version."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#####################################################
|
||||||
|
# here is the step to upgrade ubuntu 20.04 to 22.04
|
||||||
|
#####################################################
|
||||||
|
# sudo apt-get update && sudo apt-get upgrade -y
|
||||||
|
# sudo apt dist-upgrade
|
||||||
|
#### REBOOT #########################################
|
||||||
|
# sudo do-release-upgrade
|
||||||
|
#### FOLLOW ALL WITH YES ############################
|
||||||
|
|
||||||
|
sudo hostnamectl set-hostname christian-light.education
|
||||||
|
sudo apt update
|
||||||
|
|
||||||
|
sudo mkdir -p /etc/apt/keyrings &&
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg &&
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||||
|
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
|
||||||
|
sudo apt-get update && sudo apt-get upgrade -y
|
||||||
|
|
||||||
|
sudo apt-get remove docker \
|
||||||
|
docker-engine \
|
||||||
|
docker.io \
|
||||||
|
containerd \
|
||||||
|
runc
|
||||||
|
|
||||||
|
sudo apt-get install \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg \
|
||||||
|
lsb-release
|
||||||
|
|
||||||
|
sudo apt-get install \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
libyaml-dev -y
|
||||||
|
|
||||||
|
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
|
||||||
|
|
||||||
|
sudo curl -SL https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
sudo chmod 0755 /usr/local/bin/docker-compose && sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
||||||
|
|
||||||
|
sudo groupadd docker
|
||||||
|
|
||||||
|
sudo usermod -aG docker $USER
|
||||||
|
|
||||||
|
sudo systemctl enable docker.service
|
||||||
|
sudo systemctl enable containerd.service
|
||||||
|
|
||||||
|
sudo curl -L "https://github.com/overhangio/tutor/releases/download/v15.1.0/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
|
||||||
|
sudo chmod 0755 /usr/local/bin/tutor
|
||||||
|
|
||||||
|
tutor local launch
|
Loading…
Reference in New Issue
Block a user