title: Docker Setup with a Mysql Container for a Python App
body: <p>I have one container running "dockerfile/mysql" which I can connect to and interact with. I'm trying to build another image for a Python application that will read from a mysql db. The problem is that the Python app requires MySQL-python and attempts to install it on setup. Because this container does not hold the mysql server, i end up with;</p>
  
  <pre><code>Downloading/unpacking MySQL-python
  Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
  Running setup.py (path:/tmp/pip_build_vagrant/MySQL-python/setup.py) egg_info for package MySQL-python
  sh: 1: mysql_config: not found
  Traceback (most recent call last):
    File "&lt;string&gt;", line 17, in &lt;module&gt;
    File "/tmp/pip_build_vagrant/MySQL-python/setup.py", line 17, in &lt;module&gt;
      metadata, options = get_config()
    File "setup_posix.py", line 43, in get_config
      libs = mysql_config("libs_r")
    File "setup_posix.py", line 25, in mysql_config
      raise EnvironmentError("%s not found" % (mysql_config.path,))
  EnvironmentError: mysql_config not found
  Complete output from command python setup.py egg_info:
  sh: 1: mysql_config: not found
  </code></pre>
  
  <p>which is fully understandable.</p>
  
  <p>How should i set up my Python app container (which is using SQLAlchemy) to read from the mysql container?</p>
  
  <p>Thanks</p>