title: Using docker to compose a remote image with a local code base for *development*
body: <p>I have been reading this tutorial:</p>
  
  <p><a href="https://prakhar.me/docker-curriculum/" rel="nofollow noreferrer">https://prakhar.me/docker-curriculum/</a></p>
  
  <p>along with other tutorials, and Docker docks and I am still not completely clear on how to do this task.</p>
  
  <p><strong>The problem</strong></p>
  
  <p>My local machine is running Mac OS X, and I would like to set up a <em>development</em> environment for a python project. In this project I need to run call an api from a docker repo <code>bamos/openface</code>. The project also has some dependencies such as <code>yaml</code>, etc. If I just mount my local to <code>openface</code>, ie:</p>
  
  <pre><code>docker run -v path/to/project:/root/project -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash
  </code></pre>
  
  <p>Then I need to install <code>yaml</code> and other dependencies, and every time I exit the container the installations would be lost. Additionally, it is also much slower for some reason. So the right way to do this is using Docker compose, but I am not sure how to proceed from here. </p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>In response to the comments, I will now update the problem:
  Right now my <code>Dockerfile</code> looks like this:</p>
  
  <pre><code>FROM continuumio/anaconda
  ADD . /face-off
  WORKDIR /face-off    
  RUN pip install -r requirements.txt    
  EXPOSE 5000    
  CMD [ "python", "app.py" ]
  </code></pre>
  
  <p>It is important that I build from <code>anaconda</code> since a lot of my code will use numpy and scipy. Now I also need <code>bamos/openface</code>, so I tried adding that to my <code>docker-compose.yml</code> file:</p>
  
  <pre><code>version: '2'
  services:
    web:
      build: .
      command: python app.py
      ports:
          - "5000:5000"
      volumes:
          - .:/face-off
    openface:
      build: bamos/openface
  </code></pre>
  
  <p>However, I am getting error:</p>
  
  <pre><code>build path path/to/face-off/bamos/openface either does not exist, is not accessible, or is not a valid URL
  </code></pre>
  
  <p>So I need to pass <code>bamos/openface</code> the right way so I can build a container with it. Right now <code>bamos/openface</code> is listed when I do <code>docker images</code>.</p>