<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Networking on Nerdsid.com</title><link>https://nerdsid.com/tags/networking/</link><description>Recent content in Networking on Nerdsid.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 01 Jul 2026 11:38:29 +0000</lastBuildDate><atom:link href="https://nerdsid.com/tags/networking/index.xml" rel="self" type="application/rss+xml"/><item><title>Docker Compose Basic</title><link>https://nerdsid.com/posts/docker-compose-basic/</link><pubDate>Wed, 01 Jul 2026 11:38:29 +0000</pubDate><guid>https://nerdsid.com/posts/docker-compose-basic/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>In this lab, you&amp;rsquo;ll first deploy an application by setting up network, multiple containers individually. Then you will clean up resources, and deploy the same application using Docker Compose.&lt;/p>
&lt;h2 id="task-1-create-a-bridge-network">Task 1: Create a Bridge Network&lt;/h2>
&lt;p>Create a bridge network named &lt;code>clicknet&lt;/code>.&lt;/p>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 BASH
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">docker network create --driver bridge clicknet&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>&lt;h3 id="verify">Verify&lt;/h3>

&lt;figure class="terminal no-copy">
 &lt;header class="terminal-header">
 &lt;div class="terminal-controls">
 &lt;span class="dot dot--red">&lt;/span>
 &lt;span class="dot dot--yellow">&lt;/span>
 &lt;span class="dot dot--green">&lt;/span>
 &lt;/div>
 
 &lt;figcaption class="terminal-title">list docker networks&lt;/figcaption>
 
 &lt;/header>
 &lt;pre>&lt;code>$ docker network ls
NETWORK ID NAME DRIVER SCOPE
5aa54ade2dcc bridge bridge local
fc40bfcbce91 clicknet bridge local
238b23f4e2a9 host host local
59b9cbf97489 none null local&lt;/code>&lt;/pre>
&lt;/figure>

&lt;h2 id="task-2-run-a-redis-container">Task 2: Run a Redis Container&lt;/h2>
&lt;p>Create a background container named &lt;code>redis&lt;/code> using the &lt;code>redis:alpine&lt;/code> image and attach it to the &lt;code>clicknet&lt;/code> network.&lt;/p></description></item><item><title>Docker Environment Variables and Networking</title><link>https://nerdsid.com/posts/docker-environment-variables-and-networking/</link><pubDate>Tue, 16 Jun 2026 06:50:38 +0000</pubDate><guid>https://nerdsid.com/posts/docker-environment-variables-and-networking/</guid><description>&lt;p>In this lab, we&amp;rsquo;ll explore:&lt;/p>
&lt;ul>
&lt;li>Inspecting environment variables in running containers&lt;/li>
&lt;li>Passing environment variables at runtime&lt;/li>
&lt;li>Deploying MySQL containers&lt;/li>
&lt;li>Creating custom Docker networks&lt;/li>
&lt;li>Connecting applications and databases across containers&lt;/li>
&lt;/ul>
&lt;h2 id="task-1-inspect-environment-variables">Task 1: Inspect Environment Variables&lt;/h2>
&lt;p>First, identify the value configured for the &lt;code>APP_COLOR&lt;/code> environment variable in a running container.&lt;/p>
&lt;p>List the running containers:&lt;/p>

&lt;figure class="terminal no-copy">
 &lt;header class="terminal-header">
 &lt;div class="terminal-controls">
 &lt;span class="dot dot--red">&lt;/span>
 &lt;span class="dot dot--yellow">&lt;/span>
 &lt;span class="dot dot--green">&lt;/span>
 &lt;/div>
 
 &lt;/header>
 &lt;pre>&lt;code>$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cdf886f902d4 kodekloud/simple-webapp "python app.py" 10 minutes ago Up 10 minutes 8080/tcp mystifying_knuth&lt;/code>&lt;/pre>
&lt;/figure>

&lt;p>Inspect the container and look for the &lt;code>Env&lt;/code> section:&lt;/p></description></item><item><title>Publishing Ports in Docker</title><link>https://nerdsid.com/posts/publishing-ports-in-docker/</link><pubDate>Fri, 01 May 2026 14:37:01 +0000</pubDate><guid>https://nerdsid.com/posts/publishing-ports-in-docker/</guid><description>&lt;h2 id="task">Task&lt;/h2>
&lt;h2 id="solution">Solution&lt;/h2>

&lt;details
>
&lt;summary onclick="this.innerHTML = this.parentNode.open ? 'Show solution' : 'Show solution';">
 
 Show solution
 
&lt;/summary>
 &lt;p>This is the first paragraph of detailed content.
This is the second paragraph of even more detailed content.&lt;/p>
&lt;ul>
&lt;li>You can also include lists&lt;/li>
&lt;li>Or other markdown elements&lt;/li>
&lt;/ul>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename">
 
 service/networking/network-policy-default-deny-egress.yaml
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nn">---&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">apiVersion&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">networking.k8s.io/v1&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">NetworkPolicy&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">metadata&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">default-deny-ingress&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">spec&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">podSelector&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{}&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">policyTypes&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="l">Ingress&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>





&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 BASH
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">ls -R /etc/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">grep &lt;span class="s2">&amp;#34;name&amp;#34;&lt;/span> file.txt&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>





&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 PYTHON
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="n">name&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s2">&amp;#34;God&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">greeting&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="sa">f&lt;/span>&lt;span class="s2">&amp;#34;Hello &lt;/span>&lt;span class="si">{&lt;/span>&lt;span class="n">name&lt;/span>&lt;span class="si">}&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">greeting&lt;/span>&lt;span class="p">)&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div>&lt;h3 id="terminal-output">Terminal output&lt;/h3>
&lt;p>Before&lt;/p></description></item><item><title>Kill Any Process Using a Port in Powershell</title><link>https://nerdsid.com/posts/kill-any-process-using-a-port-in-powershell/</link><pubDate>Wed, 08 Apr 2026 05:17:46 +0000</pubDate><guid>https://nerdsid.com/posts/kill-any-process-using-a-port-in-powershell/</guid><description>&lt;p>Recently I wanted to start a server in port 8899 &amp;amp; I got an error telling that some other process is using it.&lt;/p>
&lt;p>Here is a one-liner you can use to kill an existing process bound to a port.&lt;/p>






&lt;div class="codeblock">
 &lt;div class="codeblock__header">
 &lt;div class="codeblock__filename codeblock__filename--lang">
 
 POWERSHELL
 
 &lt;/div>
 &lt;div class="codeblock__actions">
 
 &lt;/div>
 &lt;/div>
 &lt;div class="codeblock__body">
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">Stop-Process&lt;/span> &lt;span class="n">-Id&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="nb">Get-NetTCPConnection&lt;/span> &lt;span class="n">-LocalPort&lt;/span> &lt;span class="mf">8899&lt;/span>&lt;span class="p">).&lt;/span>&lt;span class="py">OwningProcess&lt;/span> &lt;span class="n">-Force&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>
&lt;/div></description></item></channel></rss>