Mengupdate package
[root@my-labs ~]# sudo dnf update -y Last metadata expiration check: 0:08:40 ago on Sun Sep 8 15:07:56 2024. Dependencies resolved. Nothing to do. Complete! [root@my-labs ~]#
Menginstall yum utils
[root@my-labs ~]# sudo dnf install -y dnf-utils Last metadata expiration check: 0:08:48 ago on Sun Sep 8 15:07:56 2024. Dependencies resolved. ================================================================================================================== Package Architecture Version Repository Size ================================================================================================================== Installing: yum-utils noarch 4.3.0-13.el9 baseos 35 k Transaction Summary ================================================================================================================== Install 1 Package Total download size: 35 k Installed size: 23 k Downloading Packages: yum-utils-4.3.0-13.el9.noarch.rpm 277 kB/s | 35 kB 00:00 ------------------------------------------------------------------------------------------------------------------ Total 36 kB/s | 35 kB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : yum-utils-4.3.0-13.el9.noarch 1/1 Running scriptlet: yum-utils-4.3.0-13.el9.noarch 1/1 Verifying : yum-utils-4.3.0-13.el9.noarch 1/1 Installed: yum-utils-4.3.0-13.el9.noarch Complete! [root@my-labs ~]#
Menambahkan repository
[root@my-labs ~]# sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo [root@my-labs ~]#
Menginstall docker
[root@my-labs ~]# sudo dnf install -y docker-ce docker-ce-cli containerd.io Docker CE Stable - x86_64 169 kB/s | 55 kB 00:00 Dependencies resolved. ================================================================================================================== Package Architecture Version Repository Size ================================================================================================================== Installing: containerd.io x86_64 1.7.21-3.1.el9 docker-ce-stable 43 M docker-ce x86_64 3:27.2.0-1.el9 docker-ce-stable 27 M docker-ce-cli x86_64 1:27.2.0-1.el9 docker-ce-stable 7.9 M Installing dependencies: container-selinux noarch 3:2.229.0-1.el9_3 appstream 52 k fuse-common x86_64 3.10.2-8.el9 baseos 7.3 k fuse-overlayfs x86_64 1.13-1.el9 appstream 66 k fuse3 x86_64 3.10.2-8.el9 appstream 53 k fuse3-libs x86_64 3.10.2-8.el9 appstream 90 k libslirp x86_64 4.4.0-7.el9 appstream 68 k slirp4netns x86_64 1.2.3-1.el9 appstream 46 k Installing weak dependencies: docker-buildx-plugin x86_64 0.16.2-1.el9 docker-ce-stable 14 M docker-ce-rootless-extras x86_64 27.2.0-1.el9 docker-ce-stable 4.0 M docker-compose-plugin x86_64 2.29.2-1.el9 docker-ce-stable 13 M Transaction Summary ================================================================================================================== Install 13 Packages Total download size: 108 M Installed size: 423 M Downloading Packages: (1/13): container-selinux-2.229.0-1.el9_3.noarch.rpm 395 kB/s | 52 kB 00:00 (2/13): fuse3-3.10.2-8.el9.x86_64.rpm 370 kB/s | 53 kB 00:00 (3/13): fuse-overlayfs-1.13-1.el9.x86_64.rpm 432 kB/s | 66 kB 00:00 (4/13): slirp4netns-1.2.3-1.el9.x86_64.rpm 810 kB/s | 46 kB 00:00 (5/13): fuse3-libs-3.10.2-8.el9.x86_64.rpm 1.0 MB/s | 90 kB 00:00 (6/13): libslirp-4.4.0-7.el9.x86_64.rpm 748 kB/s | 68 kB 00:00 (7/13): fuse-common-3.10.2-8.el9.x86_64.rpm 60 kB/s | 7.3 kB 00:00 (8/13): docker-buildx-plugin-0.16.2-1.el9.x86_64.rpm 16 MB/s | 14 MB 00:00 (9/13): docker-ce-cli-27.2.0-1.el9.x86_64.rpm 8.3 MB/s | 7.9 MB 00:00 (10/13): docker-ce-27.2.0-1.el9.x86_64.rpm 12 MB/s | 27 MB 00:02 (11/13): docker-ce-rootless-extras-27.2.0-1.el9.x86_64.rpm 4.2 MB/s | 4.0 MB 00:00 (12/13): docker-compose-plugin-2.29.2-1.el9.x86_64.rpm 14 MB/s | 13 MB 00:00 (13/13): containerd.io-1.7.21-3.1.el9.x86_64.rpm 8.9 MB/s | 43 MB 00:04 ------------------------------------------------------------------------------------------------------------------ Total 16 MB/s | 108 MB 00:06 Docker CE Stable - x86_64 15 kB/s | 1.6 kB 00:00 Importing GPG key 0x621E9F35: Userid : "Docker Release (CE rpm) <[email protected]>" Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35 From : https://download.docker.com/linux/centos/gpg Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : docker-compose-plugin-2.29.2-1.el9.x86_64 1/13 Running scriptlet: docker-compose-plugin-2.29.2-1.el9.x86_64 1/13 Installing : fuse3-libs-3.10.2-8.el9.x86_64 2/13 Running scriptlet: container-selinux-3:2.229.0-1.el9_3.noarch 3/13 Installing : container-selinux-3:2.229.0-1.el9_3.noarch 3/13 Running scriptlet: container-selinux-3:2.229.0-1.el9_3.noarch 3/13 Installing : containerd.io-1.7.21-3.1.el9.x86_64 4/13 Running scriptlet: containerd.io-1.7.21-3.1.el9.x86_64 4/13 Installing : docker-buildx-plugin-0.16.2-1.el9.x86_64 5/13 Running scriptlet: docker-buildx-plugin-0.16.2-1.el9.x86_64 5/13 Installing : docker-ce-cli-1:27.2.0-1.el9.x86_64 6/13 Running scriptlet: docker-ce-cli-1:27.2.0-1.el9.x86_64 6/13 Installing : fuse-common-3.10.2-8.el9.x86_64 7/13 Installing : fuse3-3.10.2-8.el9.x86_64 8/13 Installing : fuse-overlayfs-1.13-1.el9.x86_64 9/13 Running scriptlet: fuse-overlayfs-1.13-1.el9.x86_64 9/13 Installing : libslirp-4.4.0-7.el9.x86_64 10/13 Installing : slirp4netns-1.2.3-1.el9.x86_64 11/13 Installing : docker-ce-rootless-extras-27.2.0-1.el9.x86_64 12/13 Running scriptlet: docker-ce-rootless-extras-27.2.0-1.el9.x86_64 12/13 Installing : docker-ce-3:27.2.0-1.el9.x86_64 13/13 Running scriptlet: docker-ce-3:27.2.0-1.el9.x86_64 13/13 Running scriptlet: container-selinux-3:2.229.0-1.el9_3.noarch 13/13 Running scriptlet: docker-ce-3:27.2.0-1.el9.x86_64 13/13 Verifying : container-selinux-3:2.229.0-1.el9_3.noarch 1/13 Verifying : fuse-overlayfs-1.13-1.el9.x86_64 2/13 Verifying : fuse3-3.10.2-8.el9.x86_64 3/13 Verifying : fuse3-libs-3.10.2-8.el9.x86_64 4/13 Verifying : libslirp-4.4.0-7.el9.x86_64 5/13 Verifying : slirp4netns-1.2.3-1.el9.x86_64 6/13 Verifying : fuse-common-3.10.2-8.el9.x86_64 7/13 Verifying : containerd.io-1.7.21-3.1.el9.x86_64 8/13 Verifying : docker-buildx-plugin-0.16.2-1.el9.x86_64 9/13 Verifying : docker-ce-3:27.2.0-1.el9.x86_64 10/13 Verifying : docker-ce-cli-1:27.2.0-1.el9.x86_64 11/13 Verifying : docker-ce-rootless-extras-27.2.0-1.el9.x86_64 12/13 Verifying : docker-compose-plugin-2.29.2-1.el9.x86_64 13/13 Installed: container-selinux-3:2.229.0-1.el9_3.noarch containerd.io-1.7.21-3.1.el9.x86_64 docker-buildx-plugin-0.16.2-1.el9.x86_64 docker-ce-3:27.2.0-1.el9.x86_64 docker-ce-cli-1:27.2.0-1.el9.x86_64 docker-ce-rootless-extras-27.2.0-1.el9.x86_64 docker-compose-plugin-2.29.2-1.el9.x86_64 fuse-common-3.10.2-8.el9.x86_64 fuse-overlayfs-1.13-1.el9.x86_64 fuse3-3.10.2-8.el9.x86_64 fuse3-libs-3.10.2-8.el9.x86_64 libslirp-4.4.0-7.el9.x86_64 slirp4netns-1.2.3-1.el9.x86_64 Complete! [root@my-labs ~]# Using username "root". Last login: Sun Sep 8 14:55:36 2024 from 10.252.239.71 [root@my-labs ~]#
Check versi
[root@my-labs ~]# docker --version Docker version 27.2.0, build 3ab4256 [root@my-labs ~]#
Menjalankan aplikasi docker
[root@my-labs ~]# sudo systemctl start docker [root@my-labs ~]# sudo systemctl enable docker Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service. [root@my-labs ~]#