Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Docker publish for ARM image #2885

Merged
merged 8 commits into from
Dec 4, 2024
31 changes: 13 additions & 18 deletions docker/dockerinstall.sh
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
# Cleanup old installation
sudo apt remove docker-desktop
sudo apt remove -y docker-desktop
sudo apt-get remove -y docker docker-engine docker.io containerd runc
rm -r $HOME/.docker/desktop
sudo rm /usr/local/bin/com.docker.cli
sudo apt purge docker-desktop
sudo apt purge -y 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
sudo apt-get install -y ca-certificates curl gnupg lsb-release

# Create keyring for docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg -y
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

# 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
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
# Install docker
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

# Resolve permission issues to connect to docker socket
sudo groupadd docker
sudo usermod -aG docker $USER
sudo chown root:docker /var/run/docker.sock
# Verify installation
docker --version
sudo docker run hello-world

# 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

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

# Remove existing images
docker system prune -f
docker system prune -f -a

# Start docker service
sudo service docker start
Expand Down
Loading