Panduan#
CentOS#
- Pasang repository resmi docker
# yum
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
# dnf
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
- Pasang docker
# yum
sudo yum install -y docker-ce docker-ce-cli containerd.io
# dnf
sudo dnf install -y docker-ce docker-ce-cli containerd.io
- Enable dan jalankan servis
systemctl enable --now docker
- Verifikasi
Ubuntu#
- Pasang repository resmi docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Pasang docker
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
- Enable dan jalankan servis
systemctl enable --now docker
- Verifikasi
Referensi#