From 75f55e8c8f0cd28a3f47a6212f318f98d6cefe5a Mon Sep 17 00:00:00 2001 From: abinila siva <163017635+abinila4@users.noreply.github.com> Date: Wed, 9 Apr 2025 12:02:38 -0400 Subject: [PATCH] Update docker_install.sh --- docker_install.sh | 49 +++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/docker_install.sh b/docker_install.sh index 758ecc570..0bbb02beb 100644 --- a/docker_install.sh +++ b/docker_install.sh @@ -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!"