#!/bin/bash # Exit on any error set -e # Check if running as root if [ "$EUID" -ne 0 ]; then echo "Please run this script as root or using sudo." exit 1 fi echo "Updating package list..." apt update echo "Installing Cockpit..." apt install -y cockpit echo "Enabling and starting Cockpit service..." systemctl enable --now cockpit.socket echo "Cockpit installed and started." echo "You can access it at: https://localhost:9090"#!/bin/bash # Exit on any error set -e # Check if running as root if [ "$EUID" -ne 0 ]; then echo "Please run this script as root or using sudo." exit 1 fi echo "Updating package list..." apt update echo "Installing Cockpit..." apt install -y cockpit echo "Enabling and starting Cockpit service..." systemctl enable --now cockpit.socket echo "Cockpit installed and started." sudo apt update sudo apt install -y ca-certificates curl gnupg lsb-release sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg \ | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \ https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \ $(lsb_release -cs) stable" \ | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo systemctl enable --now docker #Add user to docker group to use docker without sudo #sudo usermod -aG docker $USER #User this to confirm the install was successful #docker --version #docker compose version sudo apt install unattended-upgrades sudo dpkg-reconfigure unattended-upgrades echo "Docker is installed user docker -v to check" echo "unattended logs can be found at /var/log/unattended-upgrades/" echo "You can access Cockpit at: https://localhost:9090"