Last active
April 25, 2024 08:54
-
-
Save OffS3c/d9857ad95e68416c12b7ef511fbc11ce to your computer and use it in GitHub Desktop.
setup.sh
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 | |
export DEBIAN_FRONTEND=noninteractive | |
export TERM=xterm-mono | |
cd ~ | |
sudo apt update | |
sudo apt full-upgrade -y | |
sudo apt autoremove -y | |
sudo apt -y install apt-transport-https git wget build-essential ca-certificates curl gnupg-agent software-properties-common | |
sudo apt clean | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt install docker-ce docker-ce-cli containerd.io -y | |
sudo usermod -aG docker $USER | |
export COMPOSE_VERSION_LATEST=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) | |
export COMPOSE_VERSION_LATEST_BC="${COMPOSE_VERSION_LATEST:1}" | |
sudo -E curl -L "https://github.com/docker/compose/releases/download/$(echo -n $COMPOSE_VERSION_LATEST)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo -E curl -L "https://raw.githubusercontent.com/docker/compose/$(echo -n $COMPOSE_VERSION_LATEST_BC)/contrib/completion/bash/docker-compose" -o /etc/bash_completion.d/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo chmod +x /etc/bash_completion.d/docker-compose | |
sudo rm -rf /etc/bash_completion.d/docker-compose | |
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose | |
sudo systemctl enable docker | |
sudo apt install nmap python zip unzip -y | |
sudo apt install ncat -y || true | |
sudo apt autoremove -y | |
sudo apt clean | |
git config --global user.name "bot" | |
git config --global user.email "[email protected]" | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
export COMPOSE_VERSION_LATEST=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) && apt update && apt install python3 -y && apt full-upgrade -y && apt clean && curl -L "https://github.com/docker/compose/releases/download/$(echo -n $COMPOSE_VERSION_LATEST)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && curl -L "https://raw.githubusercontent.com/docker/compose/$(echo -n $COMPOSE_VERSION_LATEST)/contrib/completion/bash/docker-compose" -o /etc/bash_completion.d/docker-compose && chmod +x /usr/local/bin/docker-compose && chmod +x /etc/bash_completion.d/docker-compose && rm -rf /etc/bash_completion.d/docker-compose