Mendownload script one click docker install dari website resmi docker
[root@cloud-one ~]# curl -fsSL https://get.docker.com -o get-docker.sh [root@cloud-one ~]# [root@cloud-one ~]# ls -aslh total 1M 4.0K dr-xr-x---. 4 root root 4.0K Jul 21 13:45 . 0 dr-xr-xr-x. 17 root root 263 Mar 14 2023 .. 4.0K -rw-------. 1 root root 1.4K Aug 15 2019 anaconda-ks.cfg 12K -rw-------. 1 root root 9.4K Jul 21 05:18 .bash_history 4.0K -rw-r--r--. 1 root root 18 Dec 29 2013 .bash_logout 4.0K -rw-r--r--. 1 root root 176 Dec 29 2013 .bash_profile 4.0K -rw-r--r--. 1 root root 176 Dec 29 2013 .bashrc 0 drwx------. 3 root root 18 May 13 2022 .config 4.0K -rw-r--r--. 1 root root 100 Dec 29 2013 .cshrc 24K -rw-r--r-- 1 root root 22K Jul 21 13:45 get-docker.sh 4.0K -rw-------. 1 root root 171 Aug 16 2019 .mysql_history 0 drwxr-----. 3 root root 19 Aug 16 2019 .pki 4.0K -rw-------. 1 root root 1.0K Aug 16 2019 .rnd 4.0K -rw-r--r--. 1 root root 129 Dec 29 2013 .tcshrc [root@cloud-one ~]#
Untuk testing script jalankan perintah : sudo sh ./get-docker.sh –dry-run
[root@cloud-one ~]# sudo sh ./get-docker.sh --dry-run # Executing docker install script, commit: 6d9743e9656cc56f699a64800b098d5ea5a60020 yum install -y -q yum-utils yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum makecache yum install -y -q docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin [root@cloud-one ~]#
Untuk memulai instalasi docker, jalankan perintah berikut : sudo sh get-docker.sh
[root@cloud-one ~]# sudo sh get-docker.sh # Executing docker install script, commit: 6d9743e9656cc56f699a64800b098d5ea5a60020 + sh -c 'yum install -y -q yum-utils' Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version + sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo' Loaded plugins: fastestmirror adding repo from: https://download.docker.com/linux/centos/docker-ce.repo grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo repo saved to /etc/yum.repos.d/docker-ce.repo + '[' stable '!=' stable ']' + sh -c 'yum makecache' Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink | 15 kB 00:00:00 * epel: mirror.gi.co.id * remi-php74: cdn.centos.no * remi-safe: cdn.centos.no base | 3.6 kB 00:00:00 docker-ce-stable | 3.5 kB 00:00:00 extras | 2.9 kB 00:00:00 remi-php74 | 3.0 kB 00:00:00 remi-safe | 3.0 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/17): docker-ce-stable/7/x86_64/filelists_db | 66 kB 00:00:00 (2/17): docker-ce-stable/7/x86_64/primary_db | 152 kB 00:00:00 (3/17): docker-ce-stable/7/x86_64/updateinfo | 55 B 00:00:00 (4/17): docker-ce-stable/7/x86_64/other_db | 145 kB 00:00:00 (5/17): base/x86_64/filelists_db | 7.2 MB 00:00:00 (6/17): base/x86_64/other_db | 2.6 MB 00:00:00 (7/17): epel/x86_64/filelists_db | 15 MB 00:00:01 (8/17): epel/x86_64/prestodelta | 592 B 00:00:00 (9/17): extras/x86_64/filelists_db | 305 kB 00:00:00 (10/17): epel/x86_64/other_db | 4.1 MB 00:00:00 (11/17): remi-php74/filelists_db | 194 kB 00:00:00 (12/17): remi-php74/other_db | 57 kB 00:00:00 (13/17): remi-safe/filelists_db | 2.1 MB 00:00:01 (14/17): updates/x86_64/filelists_db | 15 MB 00:00:00 (15/17): extras/x86_64/other_db | 154 kB 00:00:01 (16/17): remi-safe/other_db | 678 kB 00:00:01 (17/17): updates/x86_64/other_db | 1.6 MB 00:00:00 Metadata Cache Created + sh -c 'yum install -y -q docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin' warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY Public key for docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm is not installed 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 setsebool: SELinux is disabled. ================================================================================ To run Docker as a non-privileged user, consider setting up the Docker daemon in rootless mode for your user: dockerd-rootless-setuptool.sh install Visit https://docs.docker.com/go/rootless/ to learn about rootless mode. To run the Docker daemon as a fully privileged service, but granting non-root users access, refer to https://docs.docker.com/go/daemon-access/ WARNING: Access to the remote API on a privileged Docker daemon is equivalent to root access on the host. Refer to the 'Docker daemon attack surface' documentation for details: https://docs.docker.com/go/attack-surface/ ================================================================================ [root@cloud-one ~]#
Menjalankan service docker
sudo systemctl start docker sudo systemctl enable docker
[root@cloud-one Docker-DocumentServer]# systemctl start docker [root@cloud-one Docker-DocumentServer]# systemctl enable docker Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. [root@cloud-one Docker-DocumentServer]# [root@cloud-one Docker-DocumentServer]#