title: Docker container is not running even if -d
body: <p>I'm french and new here (so I don't know how stack overflow works, his community) I'm gonna try to adapt myself.</p>
  
  <p>So, my first problem is the following :
  I run docker container with my image who it created with Dockerfile. (there is DNS container)
  In Dockerfile, this container have to start script.sh when it start.
  But after use that : </p>
  
  <pre><code> docker run -d -ti -p 53:53 alex/dns
  </code></pre>
  
  <p>(Use -p 53:53 because DNS.)</p>
  
  <p>I can see my DNS runing at the end of my script.sh but, when I do : 
      Docker ps -a ; but > container is not running.</p>
  
  <p>I'm novice with docker. I have started to learn it 2days ago.</p>
  
  <p>I tried to add (one by one of course):</p>
  
  <pre><code> CMD ["bash"] 
   CMD ["/bin/bash"] 
  </code></pre>
  
  <p>to run bash and make sure that does not poweroff. </p>
  
  <p>I tried to add -d in Docker run command</p>
  
  <p>I tried to use :<br>
       docker commit ti alex/dns 
  and 
       docker exec -ti alex/dns /bin/bsh</p>
  
  <p>My dockerfile file : </p>
  
  <pre><code>FROM debian
  ...
  RUN apt-get install bind9
  ...
  ADD script.sh /usr/bin/script.sh
  ...
  ENTRYPOINT ["/bin/bash", "script.sh]
  CMD ["/bin/bash"]
  </code></pre>
  
  <p>My file script.sh :</p>
  
  <pre><code>service bind9 stop
  
   *It copy en remplace conf file for bind9*
  
  service bind9 restart
  </code></pre>
  
  <p>I hope  that there are not too many mistakes and that I managed to make myself understood</p>
  
  <p>I expect the DNS container stay runing and can use it with docker exec.
  But now, after use docker run, the container start en stop juste after my script finish. Yes, the DNS server is runing the container tell me before close [ok] Bind9 running or somthing like that. But after container stop.</p>