{"id":17482,"date":"2024-11-27T11:40:03","date_gmt":"2024-11-27T03:40:03","guid":{"rendered":"https:\/\/icop-shop.com\/?p=17482"},"modified":"2024-11-27T14:52:34","modified_gmt":"2024-11-27T06:52:34","slug":"running-linux-containers-on-ubuntu","status":"publish","type":"post","link":"https:\/\/icop-shop.com\/ja\/technical-tips\/running-linux-containers-on-ubuntu\/","title":{"rendered":"Running Linux Containers on Ubuntu"},"content":{"rendered":"\n<p>In the previous tutorial (<a href=\"https:\/\/www.icop.com.tw\/news\/1538\" target=\"_blank\" rel=\"noopener\">Install Docker on Ubuntu 22.04 LTS (Intel Solution)<\/a>), we have successfully installed Docker and Docker Compose, and ran our first application \u201cHello World\u201d. In this tutorial, we will be installing multiple containers and running them all at once.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p>To follow along in this tutorial, you will need the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"line-height:1.5\"><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 style=\"line-height:1.5\">Ubuntu 22.04 LTS<\/li>\n\n\n\n<li style=\"line-height:1.5\"><a href=\"https:\/\/icop-shop.com\/technical-tips\/install-docker-on-ubuntu-22-04-lts\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">Docker and Docker Composer installed<\/mark><\/a><\/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\">Running Linux Containers on Ubuntu<\/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=\"Running Linux Containers on Ubuntu\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/FxBbJB24eIk?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\" style=\"margin-top:var(--wp--preset--spacing--30)\"><strong>Step 1 &#8211; Linux Containers<\/strong><\/h3>\n\n\n\n<p style=\"margin-top:var(--wp--preset--spacing--20)\">In this step, we are going to pull a few images from the Docker Hub Repository and they are Debian, CentOS, and Ubuntu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Debian Container<\/h3>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color\" style=\"margin-top:var(--wp--preset--spacing--20)\"><code>$ sudo docker pull Debian<\/code><br><code><br>Using default tag: latest<br>latest: Pulling from library\/debian<br>e4d61adff207: Pull complete<br>Digest: sha256:10b622c6cf6daa0a295be74c0e412ed20e10f91ae4c6f3ce6ff0c9c04f77cbf6<br>Satus: Downloaded newer image for debian:latest<br>docker.io\/library8debian:latest<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CentOS Container<\/h3>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color\" style=\"margin-top:var(--wp--preset--spacing--30)\"><code>$ sudo docker pull Debian<\/code><br><code><br>Using default tag: latest<br>latest: Pulling from library\/centos<br>a1d0c7532777: Pull complete<br>Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177<br>Satus: Downloaded newer image for centos:latest<br>docker.io\/library\/centos:latest<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ubuntu Container<\/h3>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color\" style=\"margin-top:var(--wp--preset--spacing--30)\"><code>$ sudo docker pull ubuntu<\/code><br><code><br>Using default tag: latest<br>latest: Pulling from library\/ubuntu<br>7c3b88808835: Pull complete<br>Digest: sha256:8ae9bafbb64f63a50caab98fd3a5e37b3eb837a3e0780b78e5218e63193961f9<br>Satus: Downloaded newer image for ubuntu:latest<br>docker.io\/library\/ubuntu:latest<\/code><\/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<p style=\"margin-top:var(--wp--preset--spacing--20)\">We just successfully pulled 3 images, to verify, type the following command.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color\"><code>$ sudo docker pull ubuntu<\/code><\/p>\n\n\n\n<p>We see the following result.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-black-color has-ast-global-color-4-background-color has-text-color has-background has-link-color has-fixed-layout\" style=\"border-style:none;border-width:0px\"><tbody><tr><td>REPOSITORY<\/td><td>TAG<\/td><td>IMAGE ID<\/td><td>CREATED<\/td><td>SIZE<\/td><\/tr><tr><td>ubuntu<\/td><td>latest<\/td><td>2b4cba85892a<\/td><td>6 days ago<\/td><td>72.8MB<\/td><\/tr><tr><td>debian<\/td><td>latest<\/td><td>d40157244907<\/td><td>8 days ago<\/td><td>124MB<\/td><\/tr><tr><td>centos<\/td><td>latest<\/td><td>5d0da3dc9764<\/td><td>5 months ago<\/td><td>231MB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p style=\"margin-top:var(--wp--preset--spacing--20)\">As you can see above, we just pulled down 3 different images from the Docker Hub repository. Now we can start using them.<\/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<h2 class=\"wp-block-heading\">Step 2 &#8211; Interactive Shell<\/h2>\n\n\n\n<p>By using an interactive shell, we can execute bash shell to install and remove packages. For example, let\u2019s take CentOS and execute an interactive shell by using the following command.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color\"><code>$ sudo docker run -it centos bash<\/code><\/p>\n\n\n\n<p>This will bring us to the root directory and type ls -la to list directory<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-color has-text-color\"><code>[root@0894ec55d7b4 \/]# ls -la<\/code><\/p>\n\n\n\n<p>This command will list all files and directory in the root user. Please also note that all images that are prebuilt uses root by default. You may or could change to a non-root user but that may take some configurations and a pre-build image for that to work.<\/p>\n\n\n\n<p>To exit CentOS, just type exit. You can however do the same command for Ubuntu and Debian as well.<\/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\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\">Continue Reading:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"margin-top:var(--wp--preset--spacing--20);line-height:1.5\"><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\/install-docker-on-ubuntu-22-04-lts\/\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">Install Docker on Ubuntu<\/mark><\/a><\/li>\n\n\n\n<li style=\"line-height:1.5\"><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 <\/mark><\/a><a href=\"https:\/\/icop-shop.com\/technical-tips\/run-sudo-command-without-a-password-on-linux\/\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-1-color\">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\/\"><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 Installati<\/mark><\/a><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\">on Guide<\/mark><\/a><\/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<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 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\" 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\" 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 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>In the previous tutorial (Install Docker on Ubuntu 22.04 LTS (Intel Solution)), we have successfully installed Docker and Docker Compose, and ran our first application \u201cHello World\u201d. In this tutorial, we will be installing multiple containers and running them all at once. Prerequisites To follow along in this tutorial, you [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":17503,"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":[278],"class_list":["post-17482","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-tips","tag-ebox-mini-pc"],"_links":{"self":[{"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/posts\/17482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/comments?post=17482"}],"version-history":[{"count":0,"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/posts\/17482\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/media\/17503"}],"wp:attachment":[{"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/media?parent=17482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/categories?post=17482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icop-shop.com\/ja\/wp-json\/wp\/v2\/tags?post=17482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}