replace telnet with netcat-openbsd

replace telnet with netcat-openbsd

Folks seldom need the actual telnet protocol. What we actually want is a thing that can be used to easily test a handshake on some arbitrary socket address, and, sometimes, shovel data in and out of said socket. I habitually reach for nc and am always disappointed to find it missing.

$ nc -vz localhost 22
Connection to localhost 22 port [tcp/ssh] succeeded!

Our container security automation flags these containers because the telnet source package is full of sadness. Dumb, I know. The easiest way to avoid the sec noise is to avoid all bin pkg descendants of the tainted telnet src pkg.

diff --git a/Dockerfile b/Dockerfile
index 17b1ba3..0603a29 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,10 +9,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
     less \
     lsof \
     net-tools \
+    netcat-openbsd \
     procps \
     strace \
     tcpdump \
-    telnet \
     vim \
     wget \
   && DEBIAN_FRONTEND=noninteractive apt-get clean \

GitHub sha: a5b2962aea27c314f7ff9c3aba1377db9d446cf7