Skip to content

Commit

Permalink
Fix docker install issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dphulkar-msft committed Nov 29, 2024
1 parent 0ca81ab commit 9acf75f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 50 deletions.
2 changes: 1 addition & 1 deletion common/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package common

const AzcopyVersion = "10.28.0-Preview"
const AzcopyVersion = "10.28.0"
const UserAgent = "AzCopy/" + AzcopyVersion
const S3ImportUserAgent = "S3Import " + UserAgent
const GCPImportUserAgent = "GCPImport " + UserAgent
Expand Down
66 changes: 17 additions & 49 deletions docker/dockerinstall.sh
Original file line number Diff line number Diff line change
@@ -1,60 +1,28 @@
# Cleanup old installation
sudo apt remove docker-desktop
rm -r $HOME/.docker/desktop
sudo rm /usr/local/bin/com.docker.cli
sudo apt purge docker-desktop
sudo apt-get update

# Install certificates and pre-requisites
sudo apt-get install ca-certificates curl gnupg lsb-release -y
sudo mkdir -p /etc/apt/keyrings

# Create keyring for docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg -y
sudo apt-get remove -y docker docker-engine docker.io containerd runc

# Create file for installation
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

# Install docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
#Update package index
sudo apt-get update
sudo apt-get upgrade -y

# Resolve permission issues to connect to docker socket
sudo groupadd docker
sudo usermod -aG docker $USER
sudo chown root:docker /var/run/docker.sock
# Install required dependencies
sudo apt-get install -y ca-certificates curl gnupg lsb-release

# Create the .docker directory if it doesn't exist
mkdir -p $HOME/.docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R
# Add Docker's Official GPG Key
sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

# # Cleanup old installation
# sudo apt-get remove -y docker docker-engine docker.io containerd runc
# Set Up Docker's APT Repository
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

# #Update package index
# sudo apt-get update
# sudo apt-get upgrade -y

# # Install required dependencies
# sudo apt-get install -y ca-certificates curl gnupg lsb-release

# # Add Docker's Official GPG Key
# sudo mkdir -m 0755 -p /etc/apt/keyrings
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

# # Set Up Docker's APT Repository
# 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

# # Install Docker Engine
# sudo apt-get update
# sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Install Docker Engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

# # Verify docker installation
# docker --version
# sudo docker run hello-world
# sudo systemctl enable docker
# Verify docker installation
docker --version
sudo docker run hello-world
sudo systemctl enable docker

# Delete old azcopy image
docker rmi `docker images | grep azcopy | cut -d " " -f1`
Expand Down

0 comments on commit 9acf75f

Please sign in to comment.