{"id":203,"date":"2022-03-20T17:56:28","date_gmt":"2022-03-21T00:56:28","guid":{"rendered":"https:\/\/jasonsblog.access.ly\/?p=203"},"modified":"2022-11-05T06:19:40","modified_gmt":"2022-11-05T13:19:40","slug":"manage-docker-with-portainer","status":"publish","type":"post","link":"https:\/\/jasonsblog.ddns.net\/index.php\/2022\/03\/20\/manage-docker-with-portainer\/","title":{"rendered":"Manage Docker with Portainer"},"content":{"rendered":"\n<p>In the previous post I went over how to install Docker and run a Pi-hole and Unbound stack. A much easier way to manage docker than using the CLI commands is to install a Portainer Docker container. And it couldn&#8217;t be easier.<\/p>\n\n\n\n<p>First create a Docker volume:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker volume create portainer_data<\/code><\/pre>\n\n\n\n<p>Then start your Portainer Server. In this case I changed ports to suit my machine, but the <a href=\"https:\/\/docs.portainer.io\/v\/ce-2.6\/start\/install\/server\/docker\/linux\" data-type=\"URL\" data-id=\"https:\/\/docs.portainer.io\/v\/ce-2.6\/start\/install\/server\/docker\/linux\" target=\"_blank\" rel=\"noreferrer noopener\">Portainer documentation<\/a> has the standard setup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v \/var\/run\/docker.sock:\/var\/run\/docker.sock -v portainer_data:\/data portainer\/portainer-ce<\/code><\/pre>\n\n\n\n<p>If you have other systems running Docker, you can install the Portainer Agent on those and setup access from the server installation. And when you pull up the Portainer website on &lt;ip of machine&gt;:8000, you&#8217;ll be greeted with a setup screen. <\/p>\n\n\n\n<p>Here&#8217;s the Home screen showing Docker machines:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-38-51-1024x832.png\" alt=\"\" class=\"wp-image-1739\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-38-51-1024x832.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-38-51-300x244.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-38-51-768x624.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-38-51.png 1284w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And click on a machine for the machine dashboard:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-13-1024x832.png\" alt=\"\" class=\"wp-image-1738\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-13-1024x832.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-13-300x244.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-13-768x624.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-13.png 1284w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click on containers and you can see the status of those running, and you have quick access icons for logs, inspect, stats, exec (bash), and attach to attach to the console of the running instance for messages. Portainer also makes it easy to do all your docker management tasks and even start new instances. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-24-1024x832.png\" alt=\"\" class=\"wp-image-1737\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-24-1024x832.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-24-300x244.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-24-768x624.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_2022-05-06_11-39-24.png 1284w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here&#8217;s a good guide on using Portainer:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-codeopolis wp-block-embed-codeopolis\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"elRGeA2jb9\"><a href=\"https:\/\/codeopolis.com\/posts\/beginners-guide-to-portainer\/\">Huge Guide to Portainer for Beginners<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Huge Guide to Portainer for Beginners&#8221; &#8212; Codeopolis\" src=\"https:\/\/codeopolis.com\/posts\/beginners-guide-to-portainer\/embed\/#?secret=crnWfJKOc3#?secret=elRGeA2jb9\" data-secret=\"elRGeA2jb9\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In the previous post I went over how to install Docker and run a Pi-hole and Unbound stack. A much easier way to manage docker than using the CLI commands is to install a Portainer Docker container. And it couldn&#8217;t be easier. First create a Docker volume: Then start your Portainer Server. In this case [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-203","post","type-post","status-publish","format-standard","hentry","category-tech"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"featured_image_src":null,"author_info":{"display_name":"Jason","author_link":"https:\/\/jasonsblog.ddns.net\/index.php\/author\/jturning\/"},"_links":{"self":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=203"}],"version-history":[{"count":3,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/203\/revisions"}],"predecessor-version":[{"id":1866,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/203\/revisions\/1866"}],"wp:attachment":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/categories?post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/tags?post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}