title: How do I write a dockerfile to execute a simple bash script?
body: <p>I'm trying to write a docker image to run a simple webserver though netcat.</p>
  
  <p>So I have in my docker build folder:</p>
  
  <pre><code>Dockerfile
  index.html
  run_netcat_webserver.sh
  </code></pre>
  
  <p>The <code>run_netcat_webserver.sh</code> is very simple and it works fine:</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  
  while true ; do nc -l 8080  &lt; index.html ; done
  </code></pre>
  
  <p>Here is my naive Dockerfile that of course is not working:</p>
  
  <pre><code>FROM ubuntu:14.04
  
  CMD run_netcat_webserver.sh
  </code></pre>
  
  <p>How should I proceed to make this work inside a docker container?</p>