title: How to run mysql scripts in docker image?
body: <p>In my Dockerfile</p>
  <pre><code>FROM mysql:5.7
  
  ADD ./mysql_scripts /mysql_scripts 
  WORKDIR /mysql_scripts
  RUN mysql -u root -p &lt; create_user.sql &amp;&amp;\
      mysql -u root -p &lt; create_database.sql &amp;&amp;\
      mysql -u root -p &lt; create_tables.sql
  
  EXPOSE 3306
  
  </code></pre>
  <p>but when I build that image I have problem like:<code>Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'  </code></p>