Instalasi Docker Engine dan Docker Compose di Ubuntu Focal Fossa

Artikel singkat ini menunjukkan cara sederhana melakukan instalasi Docker Engine dan Docker Compose menggunakan APT repository dan Python PIP installer. Script di bawah ini menggunakan referensi dari kedua tutorial dari Docker yaitu: https://docs.docker.com/engine/install/ubuntu/ dan https://docs.docker.com/compose/install/

#!/bin/bash
apt update
apt upgrade -y
apt install python3-pip apt-transport-https gnupg-agent software-properties-common curl ca-certificates -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt install docker-ce docker-ce-cli containerd.io -y
usermod -aG docker $USER
pip3 install docker-compose
exit 0

Untuk melakukan instalasi di Ubuntu server, unduh script di atas melalui Github Gist menggunakan command di bawah ini

$ wget https://gist.githubusercontent.com/josefmtd/e121e49c463907b2e267d997a23dc508/raw/da4d267cbb3935dbec012c1c3847c4b39aa0c0b7/install_docker_ubuntu_focal.sh
# chmod 755 install_docker_ubuntu_focal.sh
# ./install_docker_ubuntu_focal.sh

Edit: Typo di script add-apt-repository telah diperbaiki

Published by josefmtd

Electronics Engineer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: