title: I am unable to execute netcat command within docker bash terminal?
body: <p>I am a beginner in docker . <br>I have installed docker-ce in my ubuntu 18.04 machine using command<br><code>sudo apt install docker-ce</code>
  <br>
  As part of a tutorial , I am trying to establish connection between containers by executing series of below commands.<br></p>
  
  <blockquote>
    <p>Below command will turn on ports 1234/4321 to listen to traffic inside/outside of containers i'm going to use.</p>
  </blockquote>
  
  <pre><code>root@ghost-SVE9999CNS:/home/ghost# docker run --rm -ti -p 1234:1234 -p 4321:4321 --name echo-server ubuntu:18.04 bash
  </code></pre>
  
  <blockquote>
    <p>Now, I wanted to run netcat commands within docker bash terminal.</p>
  </blockquote>
  
  <pre><code>root@xxxyyyyzzzz12:/# nc -lp 1234 | nc -lp 4321
  </code></pre>
  
  <p>Once i inovke above command from my terminal.. Its giving errors "nc: command not found"</p>
  
  <pre><code>bash: nc: command not found
  bash: nc: command not found
  </code></pre>
  
  <p>Later, I have done enough research and i never found any official docker solution for this problem.</p>
  
  <p>Please could anyone help me out installing netcat within docker-ce.<br>
  I've tried commands like below.</p>
  
  <pre><code>apt-get install netstat
  apt-get install nc
  </code></pre>
  
  <p>But, no luck.</p>