Docker : Install2026/05/08 |
|
Install Docker which is the Operating System-Level Virtualization Tool, which automates the deployment of applications inside Containers. |
|
| [1] | Install Docker. |
|
root@dlp:~#
root@dlp:~# apt -y install docker.io docker version Client: Version: 29.1.3 API version: 1.52 Go version: go1.24.13 Git commit: 29.1.3-0ubuntu4.1 Built: Wed Apr 29 16:40:20 2026 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 29.1.3 API version: 1.52 (minimum version 1.44) Go version: go1.24.13 Git commit: 29.1.3-0ubuntu4.1 Built: Wed Apr 29 16:40:20 2026 OS/Arch: linux/amd64 Experimental: false containerd: Version: 2.2.2 GitCommit: runc: Version: 1.4.0-0ubuntu1 GitCommit: docker-init: Version: 0.19.0 GitCommit: |
| [2] | Download an official image and create a Container and output the words [Welcome to the Docker World] inside the Container. |
|
# download the image root@dlp:~# docker pull ubuntu
Using default tag: latest latest: Pulling from library/ubuntu 1c24335ddd46: Pull complete 6f5c5aa4e145: Pull complete 9bcf140d7f0f: Download complete Digest: sha256:f3d28607ddd78734bb7f71f117f3c6706c666b8b76cbff7c9ff6e5718d46ff64 Status: Downloaded newer image for ubuntu:latest docker.io/library/ubuntu:latest # run echo inside Container root@dlp:~# docker run ubuntu /bin/echo "Welcome to the Docker World!" Welcome to the Docker World! |
| [3] | Connect to the interactive session of a Container with [i] and [t] option like follows. If exit from the Container session, the process of a Container finishes. |
|
root@dlp:~# docker run -it ubuntu /bin/bash root@34aa2b4c88ea:/# # Container's console root@34aa2b4c88ea:/# cat /etc/os-release PRETTY_NAME="Ubuntu 26.04 LTS" NAME="Ubuntu" VERSION_ID="26.04" VERSION="26.04 (Resolute Raccoon)" VERSION_CODENAME=resolute ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=resolute LOGO=ubuntu-logoroot@34aa2b4c88ea:/# exit exit root@dlp:~# # come back
|
| [4] | If exit from the Container session with keeping container's process, push [Ctrl+p] and [Ctrl+q] key. |
|
root@dlp:~#
docker run -it ubuntu /bin/bash root@6684c3908337:/# root@dlp:~# # Ctrl+p, Ctrl+q
# show docker process root@dlp:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6684c3908337 ubuntu "/bin/bash" 27 seconds ago Up 26 seconds brave_robinson # connect to container's session root@dlp:~# docker attach 6684c3908337 root@6684c3908337:/# # shutdown container's process from Host's console root@dlp:~# docker kill 6684c3908337 6684c3908337 root@dlp:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| Sponsored Link |
|
|