<Session: 3  Installation Docker Logs>
======================================

[crx_ai_labs@docker-server ~]$ dnf repolist enabled | grep -i extras
extras-common                     CentOS Stream 9 - Extras packages
[crx_ai_labs@docker-server ~]$ sudo dnf remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
No match for argument: docker
No match for argument: docker-client
No match for argument: docker-client-latest
No match for argument: docker-common
No match for argument: docker-latest
No match for argument: docker-latest-logrotate
No match for argument: docker-logrotate
No match for argument: docker-engine
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
[crx_ai_labs@docker-server ~]$ sudo dnf -y install dnf-plugins-core
CentOS Stream 9 - BaseOS                                                                                                                                          16 MB/s | 8.8 MB     00:00    
CentOS Stream 9 - AppStream                                                                                                                                       31 MB/s |  25 MB     00:00    
CentOS Stream 9 - Extras packages                                                                                                                                 49 kB/s |  19 kB     00:00    
Google Compute Engine                                                                                                                                             30 kB/s | 7.6 kB     00:00    
Google Cloud SDK                                                                                                                                                  42 MB/s | 148 MB     00:03    
Package dnf-plugins-core-4.3.0-21.el9.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[crx_ai_labs@docker-server ~]$ 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
[crx_ai_labs@docker-server ~]$ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Docker CE Stable - x86_64                                                                                                                                        490 kB/s |  78 kB     00:00    
Last metadata expiration check: 0:00:01 ago on Sun 24 Aug 2025 05:10:37 AM UTC.
Dependencies resolved.
=================================================================================================================================================================================================
 Package                                                 Architecture                         Version                                       Repository                                      Size
=================================================================================================================================================================================================
Installing:
 containerd.io                                           x86_64                               1.7.27-3.1.el9                                docker-ce-stable                                44 M
 docker-buildx-plugin                                    x86_64                               0.26.1-1.el9                                  docker-ce-stable                                16 M
 docker-ce                                               x86_64                               3:28.3.3-1.el9                                docker-ce-stable                                21 M
 docker-ce-cli                                           x86_64                               1:28.3.3-1.el9                                docker-ce-stable                               8.6 M
 docker-compose-plugin                                   x86_64                               2.39.1-1.el9                                  docker-ce-stable                                15 M
Installing dependencies:
 container-selinux                                       noarch                               4:2.240.0-1.el9                               appstream                                       60 k
 fuse-common                                             x86_64                               3.10.2-9.el9                                  baseos                                         8.3 k
 fuse-overlayfs                                          x86_64                               1.15-1.el9                                    appstream                                       67 k
 fuse3                                                   x86_64                               3.10.2-9.el9                                  appstream                                       54 k
 fuse3-libs                                              x86_64                               3.10.2-9.el9                                  appstream                                       91 k
 libslirp                                                x86_64                               4.4.0-8.el9                                   appstream                                       68 k
 slirp4netns                                             x86_64                               1.3.3-1.el9                                   appstream                                       47 k
Installing weak dependencies:
 docker-ce-rootless-extras                               x86_64                               28.3.3-1.el9                                  docker-ce-stable                               3.4 M

Transaction Summary
=================================================================================================================================================================================================
Install  13 Packages

Total download size: 109 M
Installed size: 436 M
Is this ok [y/N]: Y
Downloading Packages:
(1/13): fuse-common-3.10.2-9.el9.x86_64.rpm                                                                                                                       44 kB/s | 8.3 kB     00:00    
(2/13): container-selinux-2.240.0-1.el9.noarch.rpm                                                                                                               278 kB/s |  60 kB     00:00    
(3/13): fuse-overlayfs-1.15-1.el9.x86_64.rpm                                                                                                                     304 kB/s |  67 kB     00:00    
(4/13): fuse3-libs-3.10.2-9.el9.x86_64.rpm                                                                                                                       848 kB/s |  91 kB     00:00    
(5/13): libslirp-4.4.0-8.el9.x86_64.rpm                                                                                                                          631 kB/s |  68 kB     00:00    
(6/13): slirp4netns-1.3.3-1.el9.x86_64.rpm                                                                                                                       840 kB/s |  47 kB     00:00    
(7/13): fuse3-3.10.2-9.el9.x86_64.rpm                                                                                                                            263 kB/s |  54 kB     00:00    
(8/13): containerd.io-1.7.27-3.1.el9.x86_64.rpm                                                                                                                   55 MB/s |  44 MB     00:00    
(9/13): docker-buildx-plugin-0.26.1-1.el9.x86_64.rpm                                                                                                              18 MB/s |  16 MB     00:00    
(10/13): docker-ce-28.3.3-1.el9.x86_64.rpm                                                                                                                        18 MB/s |  21 MB     00:01    
(11/13): docker-ce-cli-28.3.3-1.el9.x86_64.rpm                                                                                                                    19 MB/s | 8.6 MB     00:00    
(12/13): docker-ce-rootless-extras-28.3.3-1.el9.x86_64.rpm                                                                                                        11 MB/s | 3.4 MB     00:00    
(13/13): docker-compose-plugin-2.39.1-1.el9.x86_64.rpm                                                                                                            51 MB/s |  15 MB     00:00    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                             49 MB/s | 109 MB     00:02     
Docker CE Stable - x86_64                                                                                                                                         15 kB/s | 1.6 kB     00:00    
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
 From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: Y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                         1/1 
  Installing       : docker-buildx-plugin-0.26.1-1.el9.x86_64                                                                                                                               1/13 
  Running scriptlet: docker-buildx-plugin-0.26.1-1.el9.x86_64                                                                                                                               1/13 
  Installing       : docker-compose-plugin-2.39.1-1.el9.x86_64                                                                                                                              2/13 
  Running scriptlet: docker-compose-plugin-2.39.1-1.el9.x86_64                                                                                                                              2/13 
  Installing       : fuse3-libs-3.10.2-9.el9.x86_64                                                                                                                                         3/13 
  Running scriptlet: container-selinux-4:2.240.0-1.el9.noarch                                                                                                                               4/13 
  Installing       : container-selinux-4:2.240.0-1.el9.noarch                                                                                                                               4/13 
  Running scriptlet: container-selinux-4:2.240.0-1.el9.noarch                                                                                                                               4/13 
  Installing       : containerd.io-1.7.27-3.1.el9.x86_64                                                                                                                                    5/13 
  Running scriptlet: containerd.io-1.7.27-3.1.el9.x86_64                                                                                                                                    5/13 
  Installing       : docker-ce-cli-1:28.3.3-1.el9.x86_64                                                                                                                                    6/13 
  Running scriptlet: docker-ce-cli-1:28.3.3-1.el9.x86_64                                                                                                                                    6/13 
  Installing       : libslirp-4.4.0-8.el9.x86_64                                                                                                                                            7/13 
  Installing       : slirp4netns-1.3.3-1.el9.x86_64                                                                                                                                         8/13 
  Installing       : fuse-common-3.10.2-9.el9.x86_64                                                                                                                                        9/13 
  Installing       : fuse3-3.10.2-9.el9.x86_64                                                                                                                                             10/13 
  Installing       : fuse-overlayfs-1.15-1.el9.x86_64                                                                                                                                      11/13 
  Running scriptlet: fuse-overlayfs-1.15-1.el9.x86_64                                                                                                                                      11/13 
  Installing       : docker-ce-3:28.3.3-1.el9.x86_64                                                                                                                                       12/13 
  Running scriptlet: docker-ce-3:28.3.3-1.el9.x86_64                                                                                                                                       12/13 
  Installing       : docker-ce-rootless-extras-28.3.3-1.el9.x86_64                                                                                                                         13/13 
  Running scriptlet: docker-ce-rootless-extras-28.3.3-1.el9.x86_64                                                                                                                         13/13 
  Running scriptlet: container-selinux-4:2.240.0-1.el9.noarch                                                                                                                              13/13 

  Running scriptlet: docker-ce-rootless-extras-28.3.3-1.el9.x86_64                                                                                                                         13/13 
  Verifying        : fuse-common-3.10.2-9.el9.x86_64                                                                                                                                        1/13 
  Verifying        : container-selinux-4:2.240.0-1.el9.noarch                                                                                                                               2/13 
  Verifying        : fuse-overlayfs-1.15-1.el9.x86_64                                                                                                                                       3/13 
  Verifying        : fuse3-3.10.2-9.el9.x86_64                                                                                                                                              4/13 
  Verifying        : fuse3-libs-3.10.2-9.el9.x86_64                                                                                                                                         5/13 
  Verifying        : libslirp-4.4.0-8.el9.x86_64                                                                                                                                            6/13 
  Verifying        : slirp4netns-1.3.3-1.el9.x86_64                                                                                                                                         7/13 
  Verifying        : containerd.io-1.7.27-3.1.el9.x86_64                                                                                                                                    8/13 
  Verifying        : docker-buildx-plugin-0.26.1-1.el9.x86_64                                                                                                                               9/13 
  Verifying        : docker-ce-3:28.3.3-1.el9.x86_64                                                                                                                                       10/13 
  Verifying        : docker-ce-cli-1:28.3.3-1.el9.x86_64                                                                                                                                   11/13 
  Verifying        : docker-ce-rootless-extras-28.3.3-1.el9.x86_64                                                                                                                         12/13 
  Verifying        : docker-compose-plugin-2.39.1-1.el9.x86_64                                                                                                                             13/13 

Installed:
  container-selinux-4:2.240.0-1.el9.noarch        containerd.io-1.7.27-3.1.el9.x86_64                  docker-buildx-plugin-0.26.1-1.el9.x86_64         docker-ce-3:28.3.3-1.el9.x86_64       
  docker-ce-cli-1:28.3.3-1.el9.x86_64             docker-ce-rootless-extras-28.3.3-1.el9.x86_64        docker-compose-plugin-2.39.1-1.el9.x86_64        fuse-common-3.10.2-9.el9.x86_64       
  fuse-overlayfs-1.15-1.el9.x86_64                fuse3-3.10.2-9.el9.x86_64                            fuse3-libs-3.10.2-9.el9.x86_64                   libslirp-4.4.0-8.el9.x86_64           
  slirp4netns-1.3.3-1.el9.x86_64                 

Complete!
[crx_ai_labs@docker-server ~]$ 
[crx_ai_labs@docker-server ~]$ sudo systemctl enable --now docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[crx_ai_labs@docker-server ~]$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
17eec7bbc9d7: Pull complete 
Digest: sha256:a0dfb02aac212703bfcb339d77d47ec32c8706ff250850ecc0e19c8737b18567
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/

[crx_ai_labs@docker-server ~]$ sudo docker ps -a
CONTAINER ID   IMAGE         COMMAND    CREATED         STATUS                     PORTS     NAMES
1f9a3aa8a567   hello-world   "/hello"   6 seconds ago   Exited (0) 5 seconds ago             dreamy_fermat

[crx_ai_labs@docker-server ~]$ sudo groupadd docker
groupadd: group 'docker' already exists
[crx_ai_labs@docker-server ~]$ sudo usermod -aG docker $USER
[crx_ai_labs@docker-server ~]$ sudo systemctl enable docker.service
[crx_ai_labs@docker-server ~]$ sudo systemctl enable containerd.service
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /usr/lib/systemd/system/containerd.service.
[crx_ai_labs@docker-server ~]$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: disabled)
     Active: active (running) since Sun 2025-08-24 05:12:23 UTC; 1min 53s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 14110 (dockerd)
      Tasks: 11
     Memory: 31.2M
        CPU: 426ms
     CGroup: /system.slice/docker.service
             └─14110 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Aug 24 05:12:21 docker-server dockerd[14110]: time="2025-08-24T05:12:21.227756182Z" level=info msg="Loading containers: start."
Aug 24 05:12:21 docker-server dockerd[14110]: time="2025-08-24T05:12:21.290451941Z" level=info msg="Firewalld: created docker-forwarding policy"
Aug 24 05:12:23 docker-server dockerd[14110]: time="2025-08-24T05:12:23.848828935Z" level=info msg="Loading containers: done."
Aug 24 05:12:23 docker-server dockerd[14110]: time="2025-08-24T05:12:23.886329677Z" level=info msg="Docker daemon" commit=bea959c containerd-snapshotter=false storage-driver=overlay2 version=2>
Aug 24 05:12:23 docker-server dockerd[14110]: time="2025-08-24T05:12:23.886482766Z" level=info msg="Initializing buildkit"
Aug 24 05:12:23 docker-server dockerd[14110]: time="2025-08-24T05:12:23.954893317Z" level=info msg="Completed buildkit initialization"
Aug 24 05:12:23 docker-server dockerd[14110]: time="2025-08-24T05:12:23.966877599Z" level=info msg="Daemon has completed initialization"
Aug 24 05:12:23 docker-server dockerd[14110]: time="2025-08-24T05:12:23.966979122Z" level=info msg="API listen on /run/docker.sock"
Aug 24 05:12:23 docker-server systemd[1]: Started Docker Application Container Engine.
Aug 24 05:12:30 docker-server dockerd[14110]: time="2025-08-24T05:12:30.276578098Z" level=info msg="ignoring event" container=1f9a3aa8a5679af018dfe1bfb7644884e7471c360d749e34ef90186e0975b34b m>

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

<Session: 8 Deep Dive – Docker Compose Logs>

[crx_ai_labs@docker-server ~]$ curl -SL https://github.com/docker/compose/releases/download/v2.39.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to create the file /usr/local/bin/docker-compose: Permission 
Warning: denied
  0 72.1M    0  1369    0     0   6194      0  3:23:25 --:--:--  3:23:25  6194
curl: (23) Failure writing output to destination
[crx_ai_labs@docker-server ~]$ sudo curl -SL https://github.com/docker/compose/releases/download/v2.39.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 72.1M  100 72.1M    0     0   164M      0 --:--:-- --:--:-- --:--:--  335M
[crx_ai_labs@docker-server ~]$ chmod +x /usr/local/bin/docker-compose
chmod: changing permissions of '/usr/local/bin/docker-compose': Operation not permitted
[crx_ai_labs@docker-server ~]$ sudo ^C
[crx_ai_labs@docker-server ~]$ 
[crx_ai_labs@docker-server ~]$ 
[crx_ai_labs@docker-server ~]$ sudo curl -SL https://github.com/docker/compose/releases/download/v2.39.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 72.1M  100 72.1M    0     0   153M      0 --:--:-- --:--:-- --:--:--  153M
[crx_ai_labs@docker-server ~]$ sudo chmod +x /usr/local/bin/docker-compose
[crx_ai_labs@docker-server ~]$ docker-compose.exe version
Docker Compose version v2.39.2
[crx_ai_labs@docker-server ~]$ ls -lrt
total 4
-rw-r--r--. 1 crx_ai_labs crx_ai_labs 595 Aug 24 05:25 compose.yaml

To start all the services defined in your compose.yaml file:
$ sudo docker compose up
$ sudo docker compose ps
NAME                IMAGE                COMMAND                  SERVICE             CREATED             STATUS              PORTS
example-frontend-1  example/webapp       "nginx -g 'daemon ofâ¦"   frontend            2 minutes ago       Up 2 minutes        0.0.0.0:443->8043/tcp
example-backend-1   example/database     "docker-entrypoint.sâ¦"   backend             2 minutes ago       Up 2 minutes


