Advertisement
NLinker

docker install under Ubuntu 22.04

Oct 14th, 2022
1,216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 11.83 KB | None | 0 0
  1. nick@GS65 ~ % lsb_release -a
  2. No LSB modules are available.
  3. Distributor ID: Ubuntu
  4. Description:    Ubuntu 22.04.1 LTS
  5. Release:    22.04
  6. Codename:   jammy
  7.  
  8. nick@GS65 ~ % sudo apt install apt-transport-https ca-certificates curl software-properties-common
  9. [sudo] password for nick:
  10. Reading package lists... Done
  11. Building dependency tree... Done
  12. Reading state information... Done
  13. ca-certificates is already the newest version (20211016).
  14. ca-certificates set to manually installed.
  15. curl is already the newest version (7.81.0-1ubuntu1.4).
  16. software-properties-common is already the newest version (0.99.22.3).
  17. software-properties-common set to manually installed.
  18. The following NEW packages will be installed:
  19.   apt-transport-https
  20. 0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
  21. Need to get 1,506 B of archives.
  22. After this operation, 169 kB of additional disk space will be used.
  23. Do you want to continue? [Y/n] y
  24. Get:1 http://ru.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 apt-transport-https all 2.4.8 [1,506 B]
  25. Fetched 1,506 B in 0s (14.3 kB/s)              
  26. Selecting previously unselected package apt-transport-https.
  27. (Reading database ... 198659 files and directories currently installed.)
  28. Preparing to unpack .../apt-transport-https_2.4.8_all.deb ...
  29. Unpacking apt-transport-https (2.4.8) ...
  30. Setting up apt-transport-https (2.4.8) ...
  31.  
  32. nick@GS65 ~ % sudo apt update
  33. Hit:1 http://ru.archive.ubuntu.com/ubuntu jammy InRelease
  34. Get:2 http://ru.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
  35. Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]              
  36. Get:4 http://ru.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
  37. Get:5 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [139 kB]
  38. Get:6 http://ru.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [636 kB]
  39. Get:7 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [372 kB]
  40. Get:8 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [84.4 kB]
  41. Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [13.1 kB]    
  42. Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [339 kB]        
  43. Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [52.2 kB]      
  44. Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [12.4 kB]  
  45. Get:13 http://ru.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [333 kB]                
  46. Get:14 http://ru.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [92.9 kB]
  47. Get:15 http://ru.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [281 kB]
  48. Get:16 http://ru.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [430 kB]
  49. Get:17 http://ru.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [247 kB]
  50. Get:18 http://ru.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
  51. Get:19 http://ru.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [12.5 kB]
  52. Fetched 3,370 kB in 2s (1,708 kB/s)                                            
  53. Reading package lists... Done
  54. Building dependency tree... Done
  55. Reading state information... Done
  56. 34 packages can be upgraded. Run 'apt list --upgradable' to see them.
  57.  
  58. nick@GS65 ~ % curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  59. nick@GS65 ~ %
  60. nick@GS65 ~ %
  61. nick@GS65 ~ % echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  62.  
  63. nick@GS65 ~ % sudo apt update
  64. Hit:1 http://ru.archive.ubuntu.com/ubuntu jammy InRelease
  65. Hit:2 http://ru.archive.ubuntu.com/ubuntu jammy-updates InRelease                                        
  66. Hit:3 http://ru.archive.ubuntu.com/ubuntu jammy-backports InRelease                                      
  67. Get:4 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB]    
  68. Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
  69. Get:6 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages [7,756 B]
  70. Fetched 56.6 kB in 1s (89.9 kB/s)    
  71. Reading package lists... Done
  72. Building dependency tree... Done
  73. Reading state information... Done
  74. 34 packages can be upgraded. Run 'apt list --upgradable' to see them.
  75.  
  76. nick@GS65 ~ % apt-cache policy docker-ce
  77. docker-ce:
  78.   Installed: (none)
  79.   Candidate: 5:20.10.19~3-0~ubuntu-jammy
  80.   Version table:
  81.      5:20.10.19~3-0~ubuntu-jammy 500
  82.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  83.      5:20.10.18~3-0~ubuntu-jammy 500
  84.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  85.      5:20.10.17~3-0~ubuntu-jammy 500
  86.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  87.      5:20.10.16~3-0~ubuntu-jammy 500
  88.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  89.      5:20.10.15~3-0~ubuntu-jammy 500
  90.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  91.      5:20.10.14~3-0~ubuntu-jammy 500
  92.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  93.      5:20.10.13~3-0~ubuntu-jammy 500
  94.         500 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages
  95.  
  96. nick@GS65 ~ % sudo apt install docker-ce
  97. Reading package lists... Done
  98. Building dependency tree... Done
  99. Reading state information... Done
  100. The following additional packages will be installed:
  101.   containerd.io docker-ce-cli docker-ce-rootless-extras docker-scan-plugin libslirp0 pigz slirp4netns
  102. Suggested packages:
  103.   aufs-tools cgroupfs-mount | cgroup-lite
  104. The following NEW packages will be installed:
  105.   containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin libslirp0 pigz slirp4netns
  106. 0 upgraded, 8 newly installed, 0 to remove and 34 not upgraded.
  107. Need to get 102 MB of archives.
  108. After this operation, 397 MB of additional disk space will be used.
  109. Do you want to continue? [Y/n] y
  110. Get:1 http://ru.archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB]
  111. Get:2 http://ru.archive.ubuntu.com/ubuntu jammy/main amd64 libslirp0 amd64 4.6.1-1build1 [61.5 kB]
  112. Get:3 http://ru.archive.ubuntu.com/ubuntu jammy/universe amd64 slirp4netns amd64 1.0.1-2 [28.2 kB]
  113. Get:4 https://download.docker.com/linux/ubuntu jammy/stable amd64 containerd.io amd64 1.6.8-1 [28.1 MB]
  114. Get:5 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-cli amd64 5:20.10.19~3-0~ubuntu-jammy [41.5 MB]
  115. Get:6 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce amd64 5:20.10.19~3-0~ubuntu-jammy [20.5 MB]    
  116. Get:7 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-rootless-extras amd64 5:20.10.19~3-0~ubuntu-jammy [8,389 kB]
  117. Get:8 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-scan-plugin amd64 0.17.0~ubuntu-jammy [3,521 kB]  
  118. Fetched 102 MB in 16s (6,204 kB/s)                                                                                          
  119. Selecting previously unselected package pigz.
  120. (Reading database ... 198663 files and directories currently installed.)
  121. Preparing to unpack .../0-pigz_2.6-1_amd64.deb ...
  122. Unpacking pigz (2.6-1) ...
  123. Selecting previously unselected package containerd.io.
  124. Preparing to unpack .../1-containerd.io_1.6.8-1_amd64.deb ...
  125. Unpacking containerd.io (1.6.8-1) ...
  126. Selecting previously unselected package docker-ce-cli.
  127. Preparing to unpack .../2-docker-ce-cli_5%3a20.10.19~3-0~ubuntu-jammy_amd64.deb ...
  128. Unpacking docker-ce-cli (5:20.10.19~3-0~ubuntu-jammy) ...
  129. Selecting previously unselected package docker-ce.
  130. Preparing to unpack .../3-docker-ce_5%3a20.10.19~3-0~ubuntu-jammy_amd64.deb ...
  131. Unpacking docker-ce (5:20.10.19~3-0~ubuntu-jammy) ...
  132. Selecting previously unselected package docker-ce-rootless-extras.
  133. Preparing to unpack .../4-docker-ce-rootless-extras_5%3a20.10.19~3-0~ubuntu-jammy_amd64.deb ...
  134. Unpacking docker-ce-rootless-extras (5:20.10.19~3-0~ubuntu-jammy) ...
  135. Selecting previously unselected package docker-scan-plugin.
  136. Preparing to unpack .../5-docker-scan-plugin_0.17.0~ubuntu-jammy_amd64.deb ...
  137. Unpacking docker-scan-plugin (0.17.0~ubuntu-jammy) ...
  138. Selecting previously unselected package libslirp0:amd64.
  139. Preparing to unpack .../6-libslirp0_4.6.1-1build1_amd64.deb ...
  140. Unpacking libslirp0:amd64 (4.6.1-1build1) ...
  141. Selecting previously unselected package slirp4netns.
  142. Preparing to unpack .../7-slirp4netns_1.0.1-2_amd64.deb ...
  143. Unpacking slirp4netns (1.0.1-2) ...
  144. Setting up docker-scan-plugin (0.17.0~ubuntu-jammy) ...
  145. Setting up containerd.io (1.6.8-1) ...
  146. Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
  147. Setting up docker-ce-cli (5:20.10.19~3-0~ubuntu-jammy) ...
  148. Setting up libslirp0:amd64 (4.6.1-1build1) ...
  149. Setting up pigz (2.6-1) ...
  150. Setting up docker-ce-rootless-extras (5:20.10.19~3-0~ubuntu-jammy) ...
  151. Setting up slirp4netns (1.0.1-2) ...
  152. Setting up docker-ce (5:20.10.19~3-0~ubuntu-jammy) ...
  153. Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
  154. Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
  155. Processing triggers for man-db (2.10.2-1) ...
  156. Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
  157.  
  158.  
  159. nick@GS65 ~ % sudo systemctl status docker
  160. ● docker.service - Docker Application Container Engine
  161.      Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
  162.      Active: active (running) since Sat 2022-10-15 00:13:57 +06; 1min 55s ago
  163. TriggeredBy: ● docker.socket
  164.        Docs: https://docs.docker.com
  165.    Main PID: 37134 (dockerd)
  166.       Tasks: 17
  167.      Memory: 25.1M
  168.         CPU: 360ms
  169.      CGroup: /system.slice/docker.service
  170.              └─37134 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
  171.  
  172. Oct 15 00:13:56 GS65 dockerd[37134]: time="2022-10-15T00:13:56.823612651+06:00" level=info msg="scheme \"unix\" not register>
  173. Oct 15 00:13:56 GS65 dockerd[37134]: time="2022-10-15T00:13:56.823640523+06:00" level=info msg="ccResolverWrapper: sending u>
  174. Oct 15 00:13:56 GS65 dockerd[37134]: time="2022-10-15T00:13:56.823649834+06:00" level=info msg="ClientConn switching balance>
  175. Oct 15 00:13:56 GS65 dockerd[37134]: time="2022-10-15T00:13:56.898864297+06:00" level=info msg="Loading containers: start."
  176. Oct 15 00:13:57 GS65 dockerd[37134]: time="2022-10-15T00:13:57.203545187+06:00" level=info msg="Default bridge (docker0) is >
  177. Oct 15 00:13:57 GS65 dockerd[37134]: time="2022-10-15T00:13:57.340545800+06:00" level=info msg="Loading containers: done."
  178. Oct 15 00:13:57 GS65 dockerd[37134]: time="2022-10-15T00:13:57.372829132+06:00" level=info msg="Docker daemon" commit=c96464>
  179. Oct 15 00:13:57 GS65 dockerd[37134]: time="2022-10-15T00:13:57.372984314+06:00" level=info msg="Daemon has completed initial>
  180. Oct 15 00:13:57 GS65 systemd[1]: Started Docker Application Container Engine.
  181. Oct 15 00:13:57 GS65 dockerd[37134]: time="2022-10-15T00:13:57.422985463+06:00" level=info msg="API listen on /run/docker.so>
  182.  
  183.  
  184. nick@GS65 ~ %
  185. nick@GS65 ~ % echo ${USER}
  186. nick
  187.  
  188.  
  189. nick@GS65 ~ % sudo usermod -aG docker ${USER}
  190. nick@GS65 ~ % su - ${USER}
  191. Password:
  192. Unable to connect to X server
  193. [1] 37512
  194. /home/nick/.zshrc:103: command not found: call
  195. [1]  + 37512 exit 127   call ~/.dropbox/dropboxd
  196.  
  197.  
  198. nick@GS65 ~ % groups                                                                                                       ⏎
  199. nick adm cdrom sudo dip plugdev lpadmin lxd sambashare docker
  200.  
  201.  
  202. nick@GS65 ~ % docker -v
  203. Docker version 20.10.19, build d85ef84
  204.  
  205.  
  206. nick@GS65 ~ % docker ps -a
  207. CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
  208. nick@GS65 ~ %
  209.  
  210.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement