title: How to keep docker container up?
body: <p>I created a docker container where I install mariadb-server and some more stuff (see screen), but now I want to keep the container running of course, so people can connect to the database server in the container.</p>
  
  <p>The problem is that the container keeps exiting after completed running.
  In the last row of the screen you see i tried adding a tail -f, but that also didn't help.</p>
  
  <p>These are the commands I use for building and running:</p>
  
  <pre><code>sudo docker build -t databaseserver .
  sudo docker run -it -p 3306:3306 databaseserver
  </code></pre>
  
  <p>Please help me to just keep it running so i can connect to the running container</p>
  
  <p><a href="https://i.stack.imgur.com/m1EVy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m1EVy.png" alt="Screen of Dockerfile"></a></p>
  
  <p><a href="https://i.stack.imgur.com/vmlU8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vmlU8.png" alt="screen of start-up.sh"></a></p>