<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Containers on ayyzenn</title><link>https://ayyzenn.github.io/tags/containers/</link><description>Recent content in Containers on ayyzenn</description><generator>Hugo -- 0.163.3</generator><language>en-us</language><lastBuildDate>Thu, 28 Jul 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://ayyzenn.github.io/tags/containers/index.xml" rel="self" type="application/rss+xml"/><item><title>Puppet with Docker: How I Tested Master and Agent</title><link>https://ayyzenn.github.io/posts/puppet/</link><pubDate>Thu, 28 Jul 2022 00:00:00 +0000</pubDate><guid>https://ayyzenn.github.io/posts/puppet/</guid><description>&lt;h2 id="what-i-did"&gt;What I Did&lt;/h2&gt;
&lt;p&gt;I wanted to try &lt;strong&gt;Puppet&lt;/strong&gt; without dedicating two full VMs. I ran a Puppet master and agent in separate &lt;strong&gt;Ubuntu Docker containers&lt;/strong&gt; on my machine. Docker host commands work the same on Ubuntu and Arch.&lt;/p&gt;
&lt;h2 id="installing-puppet-master"&gt;Installing Puppet Master&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the Ubuntu image:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo docker pull ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a container for Puppet master:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo docker run --name puppet-master -it ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;exit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start the container:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo docker start puppet-master
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the bash shell of the Puppet master container:&lt;/p&gt;</description></item><item><title>Creating My First Docker Container</title><link>https://ayyzenn.github.io/posts/container_docker/</link><pubDate>Wed, 27 Jul 2022 00:00:00 +0000</pubDate><guid>https://ayyzenn.github.io/posts/container_docker/</guid><description>&lt;h2 id="what-i-did-here"&gt;What I Did Here&lt;/h2&gt;
&lt;p&gt;After installing Docker, I wanted to run an actual Ubuntu container — not just &lt;code&gt;hello-world&lt;/code&gt;. The steps inside this post are the same on &lt;strong&gt;Arch Linux&lt;/strong&gt; and &lt;strong&gt;Ubuntu&lt;/strong&gt; hosts. Only the Docker &lt;em&gt;installation&lt;/em&gt; differs — see &lt;a href="https://ayyzenn.github.io/posts/dockers/"&gt;Docker on Arch Linux and Ubuntu&lt;/a&gt; for that part.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="arch-linux-host"&gt;Arch Linux (host)&lt;/h2&gt;
&lt;p&gt;Make sure Docker is installed and running on your Arch machine first:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo pacman -S docker
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl enable --now docker
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl status docker
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="pull-the-ubuntu-image"&gt;Pull the Ubuntu image&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo docker pull ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="create-and-enter-a-container"&gt;Create and enter a container&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo docker run --name my-container -it ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;What those flags mean:&lt;/p&gt;</description></item><item><title>Docker on Arch Linux and Ubuntu: How I Got It Running</title><link>https://ayyzenn.github.io/posts/dockers/</link><pubDate>Tue, 26 Jul 2022 00:00:00 +0000</pubDate><guid>https://ayyzenn.github.io/posts/dockers/</guid><description>&lt;h2 id="why-i-started-using-docker"&gt;Why I Started Using Docker&lt;/h2&gt;
&lt;p&gt;I wanted a way to run apps without messing up my main system. Docker packs an app with everything it needs into a &lt;strong&gt;container&lt;/strong&gt; — a small, isolated environment that shares my kernel but stays separate from everything else.&lt;/p&gt;
&lt;p&gt;If something breaks inside a container, I delete it and start over. No reinstalling the whole OS.&lt;/p&gt;
&lt;h2 id="containers-vs-images-quick-version"&gt;Containers vs Images (Quick Version)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Image&lt;/strong&gt; — a read-only template (like a recipe)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Container&lt;/strong&gt; — a running instance of that image (like the actual dish you cooked)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You build or pull an image once. You can spin up as many containers from it as you want.&lt;/p&gt;</description></item></channel></rss>