<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Networking · Marek Šuppa</title><link>https://mareksuppa.com/tags/networking/</link><description>Personal site of Marek Šuppa — writing, teaching, and learning.</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>CC BY 4.0</copyright><lastBuildDate>Tue, 16 Jun 2026 17:39:32 +0000</lastBuildDate><atom:link href="https://mareksuppa.com/tags/networking/feed.xml" rel="self" type="application/rss+xml"/><item><title>Making HTTP requests from a container that has no curl, using bash /dev/tcp</title><link>https://mareksuppa.com/til/bash-dev-tcp-http-without-curl/</link><pubDate>Tue, 16 Jun 2026 00:00:00 +0000</pubDate><guid>https://mareksuppa.com/til/bash-dev-tcp-http-without-curl/</guid><description>&lt;p&gt;I needed to check that one container could reach another over an internal Docker network: a plain &lt;code&gt;GET /health&lt;/code&gt; against a service on a shared network. The obvious move is &lt;code&gt;curl http://service:8642/health&lt;/code&gt;. But this app image was stripped right down, with no &lt;code&gt;curl&lt;/code&gt; or &lt;code&gt;wget&lt;/code&gt; and nothing else around that I could use to open a socket.&lt;/p&gt;
&lt;p&gt;As it turns out, &lt;del&gt;&lt;code&gt;bash&lt;/code&gt; can speak HTTP by itself&lt;/del&gt; &lt;code&gt;bash&lt;/code&gt; can open a TCP socket, and you can write a small HTTP request to it by hand. Opening a connection to a host and port and writing the request needs nothing beyond the shell that&amp;rsquo;s already there:&lt;/p&gt;</description></item></channel></rss>