Update docker_install.sh

This commit is contained in:
abinila siva 2025-04-09 12:02:38 -04:00 committed by Abinila Siva
parent 93bdba4b15
commit 75f55e8c8f

View File

@ -1,22 +1,39 @@
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status
echo "Updating package lists..."
sudo apt-get update
echo "Installing CA certificates and curl..."
sudo apt-get install -y ca-certificates curl
echo "Creating the /etc/apt/keyrings directory..."
sudo install -m 0755 -d /etc/apt/keyrings
echo "Downloading and saving the Docker GPG key..."
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
echo "Setting permissions for Docker GPG key..."
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "Adding the Docker repository to APT sources..."
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
echo "Updating package lists for Docker repository..."
sudo apt-get update
echo "Installing Docker Engine, CLI, containerd, and related plugins..."
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo "Starting Docker service..."
sudo systemctl start docker
echo "Enabling Docker service to start on boot..."
sudo systemctl enable docker
sudo groupadd docker
echo "Creating docker group (if not exists) and adding current user..."
sudo groupadd docker || true
sudo usermod -aG docker $USER
sudo vim /etc/memryx/mxa_manager.conf
sudo service mxa-manager restart
LISTEN_ADDRESS="0.0.0.0"
echo "Docker installation complete!"