Para instalar Docker en un equipo o host , una de las maneras que existen es utilizar los repositorios de Docker, para ello vamos a realizar los siguientes pasos:
- Añadir en nuestros repositorios el repositorio de Docker
#Agregar la clave GPG oficial de Docker:
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
#Agregar el repositorio a nuestras fuentes de apt:
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
- Instalar los paquetes de Docker.
#Para instalar la última versión
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Verificar que la instalación se ha realizado correctamente
sudo docker run hello-world
Con este último comando estamos descargando una imagen de prueba en un contenedor. Si la instalación se ha realizado correctamente veremos un mensaje como el siguiente


Hey very cool website!! Man .. Beautiful .. Amazing .. I will bookmark your site and take the feeds also…I’m happy to find a lot of useful information here in the post, we need develop more techniques in this regard, thanks for sharing. . . . . .
I started to use Ubuntu a few weeks ago. This information helped me to install docker in my computer. Thanks for sharing it.
These are genuinely impressive ideas in about blogging.
You have touched some good things here. Any way keep up
wrinting.