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:~# ls -l
total 28
-rw-r--r-- 1 root root 21927 Jan 16 04:51 get-docker.sh
drwx------ 3 root root  4096 Nov  8  2022 snap
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: e5543d473431b782227f8908005543bb4389b8de
apt-get update -qq >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
install -m 0755 -d /etc/apt/keyrings
curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list
apt-get update -qq >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
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: e5543d473431b782227f8908005543bb4389b8de
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c install -m 0755 -d /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sh -c echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:41 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.27
  GitCommit:        a1496014c916f9e62104b33d1bb5bd03b0858e59
 runc:
  Version:          1.1.11
  GitCommit:        v1.1.11-0-g4bccb38
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

================================================================================

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:~#

Menyalakan service docker, melihat status dan mengenable docker pada startup

sudo systemctl start docker
sudo systemctl status docker
sudo systemctl enable docker
root@cloud-one:~# systemctl start docker
root@cloud-one:~# 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 2024-07-28 01:28:29 UTC; 38s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 52483 (dockerd)
      Tasks: 8
     Memory: 24.0M
        CPU: 547ms
     CGroup: /system.slice/docker.service
             └─52483 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Jul 28 01:28:28 cloud-one systemd[1]: Starting Docker Application Container Engine...
Jul 28 01:28:28 cloud-one dockerd[52483]: time="2024-07-28T01:28:28.198424873Z" level=info msg="Starting up"
Jul 28 01:28:28 cloud-one dockerd[52483]: time="2024-07-28T01:28:28.200913650Z" level=info msg="detected 127.0>
Jul 28 01:28:28 cloud-one dockerd[52483]: time="2024-07-28T01:28:28.687250605Z" level=info msg="Loading contai>
Jul 28 01:28:29 cloud-one dockerd[52483]: time="2024-07-28T01:28:29.502495676Z" level=info msg="Loading contai>
Jul 28 01:28:29 cloud-one dockerd[52483]: time="2024-07-28T01:28:29.556679316Z" level=info msg="Docker daemon">
Jul 28 01:28:29 cloud-one dockerd[52483]: time="2024-07-28T01:28:29.557284310Z" level=info msg="Daemon has com>
Jul 28 01:28:29 cloud-one dockerd[52483]: time="2024-07-28T01:28:29.678439178Z" level=info msg="API listen on >
Jul 28 01:28:29 cloud-one systemd[1]: Started Docker Application Container Engine.
lines 1-21/21 (END)
^C
root@cloud-one:~#
root@cloud-one:~# systemctl enable docker
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
root@cloud-one:~#

Leave a Reply

Your email address will not be published. Required fields are marked *