Monday, 23 June 2025

Install Docker dan Docker Compose

 
🧰 LANGKAH 1: Pasang Docker dan Docker Compose
🔹 1.1. Update & install dependensi
apt update
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y

# apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apt-transport-https is already the newest version (1.8.2.3).
ca-certificates is already the newest version (20200601~deb10u2).
gnupg2 is already the newest version (2.2.12-1+deb10u2).
curl is already the newest version (7.64.0-4+deb10u9).
The following additional packages will be installed:
  gir1.2-packagekitglib-1.0 libappstream4 libglib2.0-0 libglib2.0-bin libgstreamer1.0-0 libpackagekit-glib2-18 libstemmer0d
  packagekit packagekit-tools python3-distro-info python3-software-properties unattended-upgrades
Suggested packages:
  gstreamer1.0-tools appstream bsd-mailx default-mta | mail-transport-agent needrestart
The following NEW packages will be installed:
  gir1.2-packagekitglib-1.0 libappstream4 libglib2.0-bin libgstreamer1.0-0 libpackagekit-glib2-18 libstemmer0d packagekit
  packagekit-tools python3-distro-info python3-software-properties software-properties-common unattended-upgrades
The following packages will be upgraded:
  libglib2.0-0
1 upgraded, 12 newly installed, 0 to remove and 172 not upgraded.
Need to get 4,679 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libpackagekit-glib2-18 amd64 1.1.12-5 [116 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 libglib2.0-0 amd64 2.58.3-2+deb10u6 [1,263 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 gir1.2-packagekitglib-1.0 amd64 1.1.12-5 [35.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 libglib2.0-bin amd64 2.58.3-2+deb10u6 [126 kB]
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 python3-distro-info all 0.21+deb10u1 [8,108 B]
Get:6 http://deb.debian.org/debian buster/main amd64 libstemmer0d amd64 0+svn585-1+b2 [63.3 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 libappstream4 amd64 0.12.5-1 [110 kB]
Get:8 http://deb.debian.org/debian buster/main amd64 libgstreamer1.0-0 amd64 1.14.4-1 [2,103 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 packagekit amd64 1.1.12-5 [593 kB]
Get:10 http://deb.debian.org/debian buster/main amd64 packagekit-tools amd64 1.1.12-5 [46.9 kB]
Get:11 http://deb.debian.org/debian buster/main amd64 python3-software-properties all 0.96.20.2-2 [49.6 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 software-properties-common all 0.96.20.2-2 [83.3 kB]
Get:13 http://deb.debian.org/debian buster/main amd64 unattended-upgrades all 1.11.2 [79.0 kB]
Fetched 4,679 kB in 1s (5,213 kB/s)
apt-listchanges: Reading changelogs...
Preconfiguring packages ...
(Reading database ... 42288 files and directories currently installed.)
Preparing to unpack .../00-libglib2.0-0_2.58.3-2+deb10u6_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.58.3-2+deb10u6) over (2.58.3-2+deb10u4) ...
Selecting previously unselected package libpackagekit-glib2-18:amd64.
Preparing to unpack .../01-libpackagekit-glib2-18_1.1.12-5_amd64.deb ...
Unpacking libpackagekit-glib2-18:amd64 (1.1.12-5) ...
Selecting previously unselected package gir1.2-packagekitglib-1.0.
Preparing to unpack .../02-gir1.2-packagekitglib-1.0_1.1.12-5_amd64.deb ...
Unpacking gir1.2-packagekitglib-1.0 (1.1.12-5) ...
Selecting previously unselected package libstemmer0d:amd64.
Preparing to unpack .../03-libstemmer0d_0+svn585-1+b2_amd64.deb ...
Unpacking libstemmer0d:amd64 (0+svn585-1+b2) ...
Selecting previously unselected package libappstream4:amd64.
Preparing to unpack .../04-libappstream4_0.12.5-1_amd64.deb ...
Unpacking libappstream4:amd64 (0.12.5-1) ...
Selecting previously unselected package libglib2.0-bin.
Preparing to unpack .../05-libglib2.0-bin_2.58.3-2+deb10u6_amd64.deb ...
Unpacking libglib2.0-bin (2.58.3-2+deb10u6) ...
Selecting previously unselected package libgstreamer1.0-0:amd64.
Preparing to unpack .../06-libgstreamer1.0-0_1.14.4-1_amd64.deb ...
Unpacking libgstreamer1.0-0:amd64 (1.14.4-1) ...
Selecting previously unselected package packagekit.
Preparing to unpack .../07-packagekit_1.1.12-5_amd64.deb ...
Unpacking packagekit (1.1.12-5) ...
Selecting previously unselected package packagekit-tools.
Preparing to unpack .../08-packagekit-tools_1.1.12-5_amd64.deb ...
Unpacking packagekit-tools (1.1.12-5) ...
Selecting previously unselected package python3-distro-info.
Preparing to unpack .../09-python3-distro-info_0.21+deb10u1_all.deb ...
Unpacking python3-distro-info (0.21+deb10u1) ...
Selecting previously unselected package python3-software-properties.
Preparing to unpack .../10-python3-software-properties_0.96.20.2-2_all.deb ...
Unpacking python3-software-properties (0.96.20.2-2) ...
Selecting previously unselected package software-properties-common.
Preparing to unpack .../11-software-properties-common_0.96.20.2-2_all.deb ...
Unpacking software-properties-common (0.96.20.2-2) ...
Selecting previously unselected package unattended-upgrades.
Preparing to unpack .../12-unattended-upgrades_1.11.2_all.deb ...
Unpacking unattended-upgrades (1.11.2) ...
Setting up libglib2.0-0:amd64 (2.58.3-2+deb10u6) ...
Setting up libglib2.0-bin (2.58.3-2+deb10u6) ...
Setting up libpackagekit-glib2-18:amd64 (1.1.12-5) ...
Setting up gir1.2-packagekitglib-1.0 (1.1.12-5) ...
Setting up python3-software-properties (0.96.20.2-2) ...
Setting up libstemmer0d:amd64 (0+svn585-1+b2) ...
Setting up python3-distro-info (0.21+deb10u1) ...
Setting up libgstreamer1.0-0:amd64 (1.14.4-1) ...
Setcap worked! gst-ptp-helper is not suid!
Setting up libappstream4:amd64 (0.12.5-1) ...
Setting up software-properties-common (0.96.20.2-2) ...
Setting up unattended-upgrades (1.11.2) ...

Creating config file /etc/apt/apt.conf.d/50unattended-upgrades with new version
Created symlink /etc/systemd/system/multi-user.target.wants/unattended-upgrades.service → /lib/systemd/system/unattended-upgrade
s.service.
Synchronizing state of unattended-upgrades.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable unattended-upgrades
Setting up packagekit (1.1.12-5) ...
Setting up packagekit-tools (1.1.12-5) ...
Processing triggers for systemd (241-7~deb10u8) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.20-0+deb10u1) ...
Processing triggers for libc-bin (2.28-10+deb10u1) ...

🔹 1.2. Tambahkan GPG key Docker
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -

🔹 1.3. Tambahkan repo Docker stable
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

🔹 1.4. Install Docker
apt update
apt install docker-ce docker-ce-cli containerd.io -y

🔹 1.5. Cek versi Docker
docker --version

🧰 LANGKAH 2: Install Docker Compose (manual karena Debian 10)
Walaupun Docker Compose sekarang sudah bisa dijalankan langsung lewat docker compose, lebih stabil untuk Debian 10 jika kita instal manual versi plugin-nya.
🧩 1. Install Docker Compose plugin resmi
apt install docker-compose-plugin -y

Setelah itu, cek:
docker compose version

Kalau sukses, akan muncul semacam:
Docker Compose version v2.27.1

Jika Compose sudah siap, kita akan lanjut ke:


Share:

0 comments:

Post a Comment