title: Docker: cannot access the folder structure of based image
body: <p>I have this image:</p>
  
  <pre><code>FROM ubuntu:14.04.3
  
  # copy db project to container
  ADD . /db_project
  
  WORKDIR /db_project
  
  CMD ["./gitinitall.sh"]
  </code></pre>
  
  <p>This will copy the content of the current dir with db project that it contains git submodules which will be checked out and pulled from repo. So in db_project is the shell script that I run to get the submodules. Also has the backend that uses the dbs. The image is pushed to a private repo.</p>
  
  <p>I want to use this image to create a container where I need to add the config of the database for the environment where it needs to be deployed, something like:</p>
  
  <pre><code>FROM myprivatedockerrepo:5000/db_project
  ...
  WORKDIR /db_project
  COPY config/dev.config /db_project/apps/mydb_db/config/dev.config
  
  # get everything needed for backend
  RUN mix deps.get
  
  # expose the backend port
  EXPOSE backendport
  
  # start the beckend with the proper db configured
  CMD ["./startbeckend"]
  </code></pre>
  
  <p>But it is failing to RUN mix deps.get:</p>
  
  <pre><code>Step 14/20 : RUN mix deps.get
  ---&gt; Running in ab7375d69989
  warning: path "apps/mydb_db" is a directory but it has no mix.exs. Mix won't consider this directory as part of your umbrella application. Please add a "mix.exs" or set the ":apps" key in your umbrella configuration with all relevant apps names as atoms
  </code></pre>
  
  <p>If I add a </p>
  
  <pre><code>RUN ls apps/mydb_db  
  </code></pre>
  
  <p>before running the mix command:</p>
  
  <pre><code>ls: cannot access apps/mydb_db: No such file or directory 
  </code></pre>
  
  <p>So it seems although in the image used, myprivatedockerrepo:5000/db_project, there should be 
  db_project/apps/mydb_db - mydb_db created by the shell script submodule get from git, it cannot find it, maybe I do not understand the docker layers or something?</p>