Pada artikel kali ini saya akan membahas tentang bagaimana sih, cara install docker CE (Comunity Edition) di OS ubuntu, dan disini juga akan saya pandu cara installasinya dengan menggunakan Server Ubuntu 18.04, sebelumnya saya sudah membahas tentang Cara Install Ubuntu dan untuk dokumentasi resmi dari Docker.
Adapaun reqruitment atau persyaratan spesifikasi yang harus anda penuhi/sediakan.
Linux Ubuntu Server :
- RAM 4 GB
- HDD 50GB
- CPU 2 Proccessor
Untuk spesifikasi standar jika digunakan sebagai server Production memang seperti itu syarat minimal, tapi jika untuk bahan belajar bisa menggunakan atau custom spesifikasinya dibawah itu juga bisa.
Langkah-langkah Cara Install Docker CE di Ubuntu server :
1. Update Linux
$sudo apt-get update
2. Install Denpedency / Paket apt
$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
3. Add Official Docker GPG Key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. Add Repositori Docker
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
5. Update Packet & Install Docker
$ sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io
6. Check Service Docker
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-01-31 14:03:29 UTC; 59s ago
Docs: https://docs.docker.com
Main PID: 11715 (dockerd)
Tasks: 10
CGroup: /system.slice/docker.service
└─11715 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
7. Add User Guest/Biasa ke Group Docker
Hal ini dilakukan supaya saat mengeksekusi command tanpa tambahan sudo didepanya.
$usermod -aG docker gunawan
NB : setelah menambahkan user kita ke group docker reboot system terlebih dahulu.
Pengetesan Docker dengan Run Hello-world:
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
Digest: sha256:31b9c7d48790f0d8c50ab433d9c3b7e17666d6993084c002c2ff1ca09b96391d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
8. Check Status Image yang sedang Running
~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6dca3ebfa263 hello-world "/hello" 8 minutes ago Exited (0) 8 minutes ago zealous_lamport 66807fb622e3 hello-world "/hello" 13 minutes ago Exited (0) 13 minutes ago peaceful_stonebraker 2ac8e970fd25 hello-world "/hello" 19 minutes ago Exited (0) 19 minutes ago confident_wright
Finished, silahkan mencoba refrensi by Lukman Lab.

Admin website igunawan.com, System Administrator, DevOps Engineer