User Tools

Site Tools


docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker [2026/04/18 22:55] reddydocker [2026/04/27 10:50] (current) – [Ubuntu] reddy
Line 15: Line 15:
 # Convenience script... # Convenience script...
 # curl -fsSL https://get.docker.com -o get-docker.sh | bash # curl -fsSL https://get.docker.com -o get-docker.sh | bash
 +</code>
 +
 +===== Ubuntu =====
 +
 +<code bash>
 +#!/usr/bin/env bash
 +sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
 +
 +# Add Docker's official GPG key:
 +sudo apt update
 +sudo apt install -y 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
 +
 +# Add the repository to Apt sources:
 +sudo tee /etc/apt/sources.list.d/docker.sources <<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 apt update
 +
 +sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
 +sudo systemctl enable --now docker
 +
 +usermod -a -G docker ubuntu
 +docker run hello-world
 </code> </code>
  
docker.1776545700.txt.gz · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki