{"id":17089,"date":"2024-10-24T15:37:57","date_gmt":"2024-10-24T07:37:57","guid":{"rendered":"https:\/\/icop-shop.com\/?p=17089"},"modified":"2024-11-27T14:46:19","modified_gmt":"2024-11-27T06:46:19","slug":"install-docker-on-ubuntu-22-04-lts","status":"publish","type":"post","link":"https:\/\/icop-shop.com\/zh\/technical-tips\/install-docker-on-ubuntu-22-04-lts\/","title":{"rendered":"\u5728 Ubuntu 22.04 LTS \u4e0a\u5b89\u88dd Docker"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Docker is an application that allows you to carve up a running Linux system into a small container, each of its own separate application or services. These containers are designed to be small and portable which makes it easier to be shipped from one place to another Docker.<br>In this tutorial, you will install Docker Engine Community Edition on Ubuntu 22.04 LTS. Installing Docker on Linux is straightforward than another platform since it\u2019s just another program running natively.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\">Prerequistes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:0\">To follow along in this tutorial, you will need the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"margin-top:0;margin-bottom:0\"><a href=\"https:\/\/icop-shop.com\/?s=EB-58E&amp;post_type=product&amp;dgwt_wcas=1\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">EBOX-58E (Intel Solution)<\/mark><\/a><\/li>\n\n\n\n<li>Ubuntu 22.04 LTS<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-ast-global-color-4-color has-alpha-channel-opacity has-ast-global-color-4-background-color has-background is-style-wide\" style=\"margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>Install Docker on Ubuntu<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Install Docker on Ubuntu 22.04 LTS\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/tEHzfRrA_Rk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\" style=\"margin-top:var(--wp--preset--spacing--20)\"><strong>Step 1 &#8211; Installing Docker<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--20)\">The Docker installation package is available in the official Ubuntu repository and to ensure that we get the latest version of docker. We will need to install Docker Engine from the official repository.<br>The first step is to update the existing pages by running the following command.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-b3a3b19b7fe0531034c0dd488703edae wp-block-paragraph\"><code>$ sudo apt-get update<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we will need to install a few prerequisite packages.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color wp-block-paragraph\"><code>$ sudo apt install \\<\/code><br><code>       apt-transport-https \\<br>       ca-certificates \\<br>       curl software-properties-common<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then we need add the GPG key for the official Docker repository to your host computer.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-51e012dedd340f02c40ace87706b2932 wp-block-paragraph\"><code>$ curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the Docker repository APT source.2<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-b021a008e7ea204f6569b371fb5218bf wp-block-paragraph\"><code>$ sudo add-apt-repository \"deb [arch=amd64]\nhttps:\/\/download.docker.com\/linux\/ubuntu focal stable\"<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we will need to do another apt update to make sure we get the Docker packages.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-b3a3b19b7fe0531034c0dd488703edae wp-block-paragraph\"><code>$ sudo apt-get update<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And finally, let\u2019s install Docker and Docker Compose<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-7fe4a4edb494b60841c2667552e46973 wp-block-paragraph\"><code>$ sudo apt install docker-ce docker-compose<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\" style=\"margin-top:var(--wp--preset--spacing--20)\"><strong>Step 2 &#8211; Executing Docker Command without Sudo<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\">By default, Docker commands can only be run as root or by an user in the docker group. It is highly recommended to add your own username to the docker group by using the following command.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-a447a0ae79cb158cd2d96a218c0444b0 wp-block-paragraph\"><code>$ sudo usermod -aG docker {USER}<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\" style=\"margin-top:var(--wp--preset--spacing--20)\"><strong>Step 3 &#8211; Hello World<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\">To make sure that everything working, we will need to pull an image hello-world from the Docker Hub Repository by typing the following<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-c7379be0e3798edc4ffc3b4d54bbd581 wp-block-paragraph\"><code>$ sudo docker run hello-world<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the image does not yet exist on your local host machine, it will automatically pull the image an run the cod<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color has-link-color wp-elements-b1b0076329b4f703c7bdf022e6de7c76 wp-block-paragraph\"><code>Unable to find image 'hello-world:latest' locally\nlatest: Pulling from library\/hello-world\n0e03bdcc26d7: Pull complete\nDigest: sha256:6a65f928fb91fcfbc963f7aa6d57c8eeb426ad9a20c7ee045538ef34847f44f1\nStatus: Downloaded newer image for hello-world:latest\n\nHello from Docker!\nThis message shows that your installation appears to be working correctly.<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:23px\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-6-color\"><strong>You have successfully setup Docker and ran your first application.<\/strong><\/mark><\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-ast-global-color-4-color has-alpha-channel-opacity has-ast-global-color-4-background-color has-background is-style-wide\" style=\"margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Continue Reading:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"margin-top:var(--wp--preset--spacing--20)\"><a href=\"https:\/\/www.compactpc.com.tw\/datas\/upload\/files\/video\/Technical%20video\/EB-58%20Series%20Lubuntu%2022.04.4%20LTS%20installation%20guide.mp4\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">How to install Ubuntu on EBOX-58E<\/mark><\/a><\/li>\n\n\n\n<li style=\"line-height:1.5\"><a href=\"https:\/\/icop-shop.com\/technical-tips\/running-linux-containers-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">Running Linux Containers on Ubuntu<\/mark><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/icop-shop.com\/technical-tips\/run-sudo-command-without-a-password-on-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">Run sudo command without a password on Linux<\/mark><\/a><\/li>\n\n\n\n<li style=\"line-height:1.5\"><a href=\"https:\/\/icop-shop.com\/technical-tips\/ebox-mini-pc-ubuntu-12-04-non-pae-installation-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">EBOX Mini PC Ubuntu 12.04 non PAE Installation Guide<\/mark><\/a><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator alignwide has-text-color has-ast-global-color-4-color has-alpha-channel-opacity has-ast-global-color-4-background-color has-background is-style-wide\" style=\"margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)\"\/>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p class=\"has-text-align-left wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)\"><img fetchpriority=\"high\" decoding=\"async\" width=\"500\" height=\"500\" class=\"wp-image-5603\" style=\"width: 500px;\" src=\"https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3.jpg\" alt=\"EBOX-58N f\" title=\"\" srcset=\"https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3.jpg 1080w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-300x300.jpg 300w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-1024x1024.jpg 1024w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-150x150.jpg 150w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-768x768.jpg 768w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-600x600.jpg 600w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-100x100.jpg 100w, https:\/\/icop-shop.com\/wp-content\/uploads\/2022\/02\/EBOX-58N-f-3-64x64.jpg 64w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p class=\"has-medium-font-size wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40);line-height:1.5\"><strong>Main features of&nbsp;<a href=\"https:\/\/icop-shop.com\/?s=EB-58E&amp;post_type=product&amp;dgwt_wcas=1\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">EBOX-58E<\/mark><\/a>:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"line-height:1.5\">Intel\u00ae Braswell x5-E8000 1.04GHz Quad Core<\/li>\n\n\n\n<li style=\"line-height:1.5\">SO-DIMM, DDR3L\u20101600MHz up to 8GB<\/li>\n\n\n\n<li style=\"line-height:1.5\">2S \/ 4U \/ 2GLAN \/ Mic-in \/ Line-out \/ HDMI \/ SATA \/ M.2 \/ mSD<\/li>\n\n\n\n<li style=\"line-height:1.5\">Operation Temperature: 0\u00b0C ~ +60\u00b0C<\/li>\n\n\n\n<li style=\"line-height:1.5\">RS-232 \/ RS-485 \/ TTL(Optional)<\/li>\n\n\n\n<li style=\"line-height:1.5\">DIN Rail Support (Optional)<\/li>\n\n\n\n<li style=\"line-height:1.5\">PXE diskless boot<\/li>\n\n\n\n<li style=\"line-height:1.5\">AMI UEFI BIOS (Legacy mode switchable)<\/li>\n\n\n\n<li style=\"line-height:1.5\">TPM<\/li>\n\n\n\n<li style=\"line-height:1.5\">Auto Power On<\/li>\n\n\n\n<li style=\"line-height:1.5\">100x100mm VESA standard<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator alignwide has-text-color has-ast-global-color-4-color has-alpha-channel-opacity has-ast-global-color-4-background-color has-background is-style-wide\" style=\"margin-bottom:var(--wp--preset--spacing--30)\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\">For more info and sample request, please write to&nbsp;<a href=\"mailto:info@icop.com.tw\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">info@icop.com.tw<\/mark><\/a>, call your nearest&nbsp;<a href=\"https:\/\/www.icop.com.tw\/branches\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">ICOP Branch<\/mark><\/a>, or contact our&nbsp;<a href=\"https:\/\/www.icop.com.tw\/distributors\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">Worldwide Official Distributor<\/mark>.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker is an application that allows you to carve up a running Linux system into a small container, each of its own separate application or services. These containers are designed to be small and portable which makes it easier to be shipped from one place to another Docker.In this tutorial, [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":17254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[284],"tags":[285,278],"class_list":["post-17089","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-tips","tag-docker","tag-ebox-mini-pc"],"_links":{"self":[{"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/posts\/17089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/comments?post=17089"}],"version-history":[{"count":0,"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/posts\/17089\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/media\/17254"}],"wp:attachment":[{"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/media?parent=17089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/categories?post=17089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icop-shop.com\/zh\/wp-json\/wp\/v2\/tags?post=17089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}