{"id":73510,"date":"2020-10-14T01:31:28","date_gmt":"2020-10-13T22:31:28","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=73510"},"modified":"2023-03-31T19:21:57","modified_gmt":"2023-03-31T16:21:57","slug":"install-pouch-container-engine-on-ubuntu-centos","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/install-pouch-container-engine-on-ubuntu-centos\/","title":{"rendered":"Install Pouch Container Engine on Ubuntu  \/ CentOS 7"},"content":{"rendered":"\n<p>PouchContainer is an open-source container technology by Alibaba. Just like Docker, PouchContainer utilizes the image technology. A container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"855\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-1024x855.png\" alt=\"\" class=\"wp-image-74068\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-1024x855.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-300x251.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-768x641.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-696x581.png 696w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-1068x892.png 1068w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer-503x420.png 503w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/PouchContainer.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>PouchContainer has the following features: <\/strong><\/p>\n\n\n\n<p>PouchContainer includes a<strong> <code>rich container<\/code><\/strong> mode: This is having features and functions of a container that can  be extended to support a broader range of requirements such as health status monitoring, threads, stack, lock contention, network message statistics and configuration information.<\/p>\n\n\n\n<p><strong>Isolation<\/strong>: The technology embraces high isolation and security principles, like hypervisor-based container technology, lxcfs, directory disk quota, patched Linux kernel etc.<\/p>\n\n\n\n<p>On a large scale deployment, pouch container utilizes Dragonfly, a<strong> P2P-base distribution system<\/strong> that increases the rate of container distribution with a huge margin.<\/p>\n\n\n\n<p>PouchContainer is  <strong><a href=\"https:\/\/computingforgeeks.com\/install-kubernetes-production-cluster-using-rancher-rke\/\">Kubernetes<\/a> compatible<\/strong> such that you can easily migrate from one <a href=\"https:\/\/computingforgeeks.com\/install-kubernetes-cluster-on-rocky-linux-with-kubeadm-crio\/\">Kubernetes<\/a> runtime to PouchContainer.<\/p>\n\n\n\n<p>Pouch container has many advantages over traditional VM technologies. Let us explore some of the interesting ones:<\/p>\n\n\n\n<p><strong>1.<\/strong>  <strong>Resource friendly<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/computingforgeeks.com\/install-and-use-winget-windows-package-manager-client\/\">Applications<\/a> running on PouchContainer can minimize their storage usage with a layered image structure. It also allows incremental image distribution which in turn saves  bandwidth consumption compared to legacy VM technologies.<\/p>\n\n\n\n<p><strong>2. Application oriented<\/strong><\/p>\n\n\n\n<p>PouchContainer  provides cross-platform and cross-OS application delivery. This is made possible with the strong application runtime isolation technique.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-install-pouchcontainer-on-ubuntu\">Install Pouch Container on Ubuntu 22.04|20.04|18.04<\/h2>\n\n\n\n<p>PouchContainer works hand-in-hand with LXCFS for isolation. LXCFS is a user-space filesystem used in the implementation of containers. <\/p>\n\n\n\n<p>We need to install LXCFS beforehand, in order to have PouchContainer running on our Ubuntu server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install lxcfs<\/code><\/pre>\n\n\n\n<p>Install packages that will allow aptitude  to use a repository over HTTPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install curl apt-transport-https ca-certificates software-properties-common<\/code><\/pre>\n\n\n\n<p>The next step is to add PouchContainer&#8217;s official GPG key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL http:\/\/mirrors.aliyun.com\/opsx\/pouch\/linux\/debian\/opsx@service.alibaba.com.gpg.key | sudo apt-key add -<\/code><\/pre>\n\n\n\n<p>Add PouchContainer repository to your Ubuntu server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo add-apt-repository \"deb http:\/\/mirrors.aliyun.com\/opsx\/pouch\/linux\/debian\/ pouch stable\"<\/code><\/pre>\n\n\n\n<p>Install the latest version of PouchContainer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install pouch<\/code><\/pre>\n\n\n\n<p>Start and enable PouchContainer<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start pouch\nsudo systemctl enable pouch<\/code><\/pre>\n\n\n\n<p>We now have Pouch Container deployed successfully on Ubuntu server. We&#8217;ll be exploring some of the basic PouchContainer commands later in this article.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-to-install-pouchcontainer-on-centos-7\">How To Install PouchContainer on CentOS 7<\/h3>\n\n\n\n<p>Note that PouchContainer can&#8217;t be installed alongside Docker on the same instance. If you have a running Docker service and wish to install PouchContainer, uninstall Docker before installing PouchContainer.<\/p>\n\n\n\n<p>The steps below will guide you on how to install PouchContainer on an instance running CentOS 7<\/p>\n\n\n\n<p>1.<strong> Install yum utilities<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install -y yum-utils<\/code><\/pre>\n\n\n\n<p>2. <strong>Configure PouchContainer repositories to your Centos 7 server<\/strong> <strong>and update the system<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum-config-manager --add-repo http:\/\/mirrors.aliyun.com\/opsx\/opsx-centos7.repo\nsudo yum update<\/code><\/pre>\n\n\n\n<p>3.<strong> Install PouchContainer<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install pouch<\/code><\/pre>\n\n\n\n<p>PouchContainer creates a group &#8216;pouch&#8217; with no users added to it. Only root user has exclusive access to any user-group.<\/p>\n\n\n\n<p><strong>4. Start PouchContainer<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start pouch\nsudo systemctl enable pouch<\/code><\/pre>\n\n\n\n<p>To run pouch commands with  non-root users we need to add the user to the pouch group: <\/p>\n\n\n\n<p><strong>Add user to group<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo gpasswd -a $USER pouch<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-pouchcontainer-container-engine-usage\">PouchContainer Container Engine Usage<\/h2>\n\n\n\n<p>PouchContainer has an architecture of client\/server. In this case, there are two command-line that are issued depending with the context:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouchd: a daemon side binary to run as a server;\npouch: a client side binary to run as a client.<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-deploying-a-simple-nginx-application-on-pouchcontainer\">Deploying a simple Nginx application on PouchContainer<\/h3>\n\n\n\n<p>As mentioned earlier, it is compatible with docker images.<\/p>\n\n\n\n<p>We&#8217;ll download nginx image and run an nginx container:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouch run --name webserver -p 80:80 -d nginx<\/code><\/pre>\n\n\n\n<p>This command downloads nginx image from docker repository and starts the container named &#8216;webserver&#8217;.<\/p>\n\n\n\n<p>The container has an internal port 80  mapped to port 80 of the server.<\/p>\n\n\n\n<p>To verify if the container is running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouch ps -a<\/code><\/pre>\n\n\n\n<p>The output should be as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@pouch ~]# <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">pouch ps -a<\/mark>\nName        ID       Status       Created          Image                                          Runtime\nwebserver   ad50b8   created      13 seconds ago   registry.hub.docker.com\/library\/nginx:latest   runc<\/code><\/pre>\n\n\n\n<p>Nginx can now be accessible on port 80 of the host:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"265\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/pouchContainer-nginx.png\" alt=\"\" class=\"wp-image-73567\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/pouchContainer-nginx.png 600w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/10\/pouchContainer-nginx-300x133.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>To run native commands on  a container use<strong> <\/strong>pouch exec:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ pouch exec -it &lt;container&gt; &#91;command]\n# Example\n$ pouch exec -it webserver \/bin\/bash<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-pouchcontainer-basic-management-commands\">PouchContainer basic management commands<\/h3>\n\n\n\n<p> Other PouchContainer basic usage commands include:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">pouch version<\/mark>\nVersion:         1.3.0\nAPIVersion:      1.24\nArch:            amd64\nBuildTime:       2019-06-13T11:25:25+00:00\nGitCommit:       1.3.0\nGoVersion:       go1.10.4\nKernelVersion:   3.10.0-1127.el7.x86_64\nOs:              linux\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-1-pouch-pull\">1. Pouch pull<\/h4>\n\n\n\n<p>Usage: pouch pull &lt;image&gt;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@pouch ~]#<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\"> pouch pull ubuntu<\/mark>\nregistry.hub.docker.com\/library\/ubuntu:latest:                                    resolved       |++++++++++++++++++++++++++++++++++++++| \nindex-sha256:bc2f7250f69267c9c6b66d7b6a81a54d3878bb85f1ebb5f951c896d13e6ba537:    done           |++++++++++++++++++++++++++++++++++++++| \nmanifest-sha256:2e70e9c81838224b5311970dbf7ed16802fbfe19e7a70b3cbfa3d7522aa285b4: done           |++++++++++++++++++++++++++++++++++++++| \nlayer-sha256:b6a83d81d1f4f942d37e1f17195d9c519969ed3040fc3e444740b884e44dec33:    done           |++++++++++++++++++++++++++++++++++++++| \nlayer-sha256:d72e567cc804d0b637182ba23f8b9ffe101e753a39bf52cd4db6b89eb089f13b:    done           |++++++++++++++++++++++++++++++++++++++| \nlayer-sha256:0f3630e5ff08d73b6ec0e22736a5c8d2d666e7b568c16f6a4ffadf8c21b9b1ad:    done           |++++++++++++++++++++++++++++++++++++++| \nconfig-sha256:9140108b62dc87d9b278bb0d4fd6a3e44c2959646eb966b86531306faa81b09b:   done           |++++++++++++++++++++++++++++++++++++++| \nelapsed: 12.3s                                                                    total:  27.2 M (2.2 MiB\/s)                                       \n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-2-pouch-run\">2. pouch run<\/h4>\n\n\n\n<p>Usage: pouch run -it &lt;image&gt;<\/p>\n\n\n\n<p>This command is used to create a container from an image<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@pouch ~]# <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">pouch run -it  ubuntu<\/mark>\nroot@f4abc5c8966b:\/# <\/code><\/pre>\n\n\n\n<p>Show list pf locally stored pouch images<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouch images<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-3-stop-pouch-container\">3. Stop pouch container:<\/h4>\n\n\n\n<p>Stop the container first using syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouch stop &lt;container&gt;\n# Example\npouch stop webserver<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-4-remove-container\">4. <strong>Remove container<\/strong><\/h4>\n\n\n\n<p>To remove a container use the command syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouch rm &lt;container&gt;<\/code><\/pre>\n\n\n\n<p>e.g<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pouch rm webserver<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-5-pouch-commit\">5. pouch commit<\/h4>\n\n\n\n<p>Usage: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker commit &lt;conatainer id&gt; &lt;username\/imagename&gt;<\/code><\/pre>\n\n\n\n<p>This command creates a new image of an edited container on the local system<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-pouch-daemon-config\">Pouch Daemon Config<\/h2>\n\n\n\n<p>With daemon config file, a user can set flags to for pouchd: a server side commandline tool.<\/p>\n\n\n\n<p>With PouchContainer, there are two ways for users to pass flags to daemon:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Running  pouchd directly with flags specified, e.g  <code>pouchd -c \/var\/run\/containerd.sock<\/code>, <\/li>\n\n\n\n<li>Using daemon config file.<\/li>\n<\/ol>\n\n\n\n<p>Pouchd flags can be found at <a href=\"https:\/\/github.com\/alibaba\/pouch\/blob\/master\/docs\/commandline\/pouchd.md\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/alibaba\/pouch\/blob\/master\/docs\/commandline\/pouchd.md<\/a><\/p>\n\n\n\n<p><strong>Configuring pouchd config file<\/strong>:<\/p>\n\n\n\n<p>Users are recommended  to set daemon flag through daemon config file, the default path to config file is <code>\/etc\/pouch\/config.json<\/code>, you can change it by set value of <code>--config-file<\/code><\/p>\n\n\n\n<p><strong>Runtime format<\/strong><\/p>\n\n\n\n<p>If user want to add more runtime into pouchd, add like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"add-runtime\": {\n        \"runc\": {\n            \"path\": \"\/usr\/local\/bin\/runc\",\n            \"runtimeArgs\": &#91;\n                \"--debug\"\n            ]\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p><strong>Steps to configure config file<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install PouchContainer<\/li>\n\n\n\n<li>Edit daemon config file, like:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"image-proxy\": \"http:\/\/127.0.0.1:65001\",\n    \"debug\": false\n}<\/code><\/pre>\n\n\n\n<p>3. Start pouch service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start pouch<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-uninstall-pouch\">How To Uninstall pouch<\/h2>\n\n\n\n<p>On Ubuntu:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get purge pouch<\/code><\/pre>\n\n\n\n<p>On CentOS<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum remove pouch<\/code><\/pre>\n\n\n\n<p>After running the remove command, images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers and volumes, execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rm -rf \/var\/lib\/pouch<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>PouchContainer is one of the best container technologies. It has many advantages over the legacy VM technology and has many features that you would really want to explore. We&#8217;ll be covering more features of PouchContainer in other articles on this site. Feel free to leave a message if you have any suggestions about the technology, or if you encounter any issues during the installation process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PouchContainer is an open-source container technology by Alibaba. Just like Docker, PouchContainer utilizes the image technology. A container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. PouchContainer has the following features: PouchContainer includes a rich container mode: This &#8230; <a title=\"Install Pouch Container Engine on Ubuntu  \/ CentOS 7\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/install-pouch-container-engine-on-ubuntu-centos\/\" aria-label=\"Read more about Install Pouch Container Engine on Ubuntu  \/ CentOS 7\">Read more<\/a><\/p>\n","protected":false},"author":17,"featured_media":74068,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,316,690,50,81],"tags":[218,34308,34309],"cfg_series":[],"class_list":["post-73510","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-containers","category-dev","category-linux-tutorials","category-ubuntu","tag-containers","tag-pouch","tag-pouchcontainer"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/73510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=73510"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/73510\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/74068"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=73510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=73510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=73510"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=73510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}