Diferencia entre revisiones de «Instalar Docker»
Ir a la navegación
Ir a la búsqueda
(feat: Instalar Docker - Debian Bullseye) |
(feat: add Instalar Docker in Ubuntu 24.04 LTS) |
||
Línea 44: | Línea 44: | ||
sudo systemctl restart docker | sudo systemctl restart docker | ||
sudo chmod 777 /var/run/docker.sock | sudo chmod 777 /var/run/docker.sock | ||
== Ubuntu == | |||
=== Ubuntu 24.04 LTS === | |||
# Add Docker's official GPG key: | |||
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 | |||
# Add the repository to Apt sources: | |||
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 update |
Revisión del 07:06 25 may 2024
GNU/Linux
Debian
Debian 12 Bullseye
su apt update apt install ca-certificates curl gnupg apt-transport-https gpg curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" |tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
Verificar
systemctl is-active docker
Sale por pantalla:
active
Fedora
Fedora 38 Workstation
sudo dnf install docker
Levantar servicio
sudo systemctl start docker
Verificar estado
sudo systemctl status docker
Permisos
Se puede dar permisos de utilización de docker a un usuario en especifico. En nuestro ejemplo daríamos permisos al usuario proyectosbeta.
sudo groupadd docker sudo usermod -aG docker proyectosbeta sudo chown root:docker /var/run/docker.sock sudo systemctl restart docker sudo chmod 777 /var/run/docker.sock
Ubuntu
Ubuntu 24.04 LTS
# Add Docker's official GPG key: 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
# Add the repository to Apt sources: 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 update