title: How to run bash on docker container with entry point?
body: <p>How can I run bash on a container with an ENTRYPOINT? </p>
  
  <pre><code>FROM ubuntu:18.04
  ENV DEBIAN_FRONTEND noninteractive
  
  RUN apt-get update \
      &amp;&amp; apt-get install -y curl gnupg
  RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \
      &amp;&amp; export NVM_DIR="$HOME/.nvm" \
      &amp;&amp; [ -s "$NVM_DIR/nvm.sh" ] &amp;&amp; \. "$NVM_DIR/nvm.sh" \
      &amp;&amp; [ -s "$NVM_DIR/bash_completion" ] &amp;&amp; \. "$NVM_DIR/bash_completion"  \
      &amp;&amp; nvm i 8.11 \
      &amp;&amp; apt-get install -y mysql-server=5.7.23-0ubuntu0.18.04.1 python3 python3-pip  \
      &amp;&amp; ln -s /usr/bin/python3 /usr/bin/python \
      &amp;&amp; ln -s /usr/bin/pip3 /usr/bin/pip \
      &amp;&amp; pip install awscli --upgrade --user \
      &amp;&amp; apt-get clean \
      &amp;&amp; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  
  ENTRYPOINT [ "/etc/init.d/mysql", "start" ] 
  
  EXPOSE 3306
  </code></pre>
  
  <p>I tried: </p>
  
  <pre><code> jiewmeng@JM  ~/Dropbox/ci-docker-node-mysql  docker run -it ci-docker-node-mysql bash
   * Starting MySQL database server mysqld                                        No directory, logging in with HOME=/
                                                                           [ OK ]
   jiewmeng@JM  ~/Dropbox/ci-docker-node-mysql  
  </code></pre>
  
  <p>But I got kicked out once MySQL starts</p>
  
  <hr>
  
  <p>I tried running my docker container ... </p>
  
  <pre><code>jiewmeng@JM  ~/Dropbox/ci-docker-node-mysql  docker run -p 3307:3306 ci-docker-node-mysql
  ✘ jiewmeng@JM  ~/Dropbox/ci-docker-node-mysql  mysql -h 127.0.0.1:3307
  ERROR 2005 (HY000): Unknown MySQL server host '127.0.0.1:3307' (2)
  </code></pre>
  
  <p>But seems like I cannot connect. What did I do wrong? </p>