---
# System prepended metadata

title: docker setup

---

# docker setup

[TOC]

## ubuntu 22.04
```
which curl || sudo apt-get install -y curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
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
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
#sudo systemctl is-active docker
#sudo usermod -aG docker ${USER}
sudo usermod -aG docker $(whoami)
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
newgrp docker
```

## docker mind map
```plantuml
@startuml
# https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
@startmindmap
+ Docker
++ Imatges
+++ creació 
+++ descàrrega
+++ etiquetat\n(versions)
++ Registres\n(Repositoris)
+++ DockerHub
+++ Quay
+++ Gitlab
+++ ttl.sh
++ Containers
+++ creació 
++++ Dockerfile
+++ eliminació
+++ consulta
+++ accés
-- Logs
-- Volums
--- en local
--- compartits
--- creació
-- Xarxes
--- host
--- bridged (nat)
-- Orquestració
--- node únic
---- Docker Compose
--- node múltiple 
---- swarm
----- Docker Compose
---- kubernetes
----- manifests
@endmindmap
@enduml
``` 
