chore(docker): update Ubuntu installation to current official Docker setup
- switch Docker APT repo config from docker.list to docker.sources - keep GPG key in /etc/apt/keyrings/docker.asc - remove installation of legacy docker-compose package - use docker-compose-plugin as the recommended Compose integration - add cleanup of old/conflicting Docker-related packages before install - align installation steps with current Docker documentation for Ubuntu
This commit is contained in:
@ -1,14 +1,20 @@
|
||||
# Remove old/conflicting packages first if they exist
|
||||
sudo apt remove docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc
|
||||
|
||||
sudo apt update
|
||||
sudo apt 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 tee /etc/apt/sources.list.d/docker.sources > /dev/null <<EOF
|
||||
Types: deb
|
||||
URIs: https://download.docker.com/linux/ubuntu
|
||||
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
|
||||
Components: stable
|
||||
Architectures: $(dpkg --print-architecture)
|
||||
Signed-By: /etc/apt/keyrings/docker.asc
|
||||
EOF
|
||||
|
||||
sudo cat /etc/apt/sources.list.d/docker.list
|
||||
sudo apt update
|
||||
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
Reference in New Issue
Block a user