title: Docker-compose rails image won't start after reboot
body: <p>It ran just before I rebooted my machine, and suddenly I get <code>Could not locate Gemfile or .bundle/ directory</code> when starting the container.</p>
  
  <p>During build, which completes without issue, I can see the contents of /app are correct, but on startup, /app only contains a .bundle directory and nothing else.</p>
  
  <p><em>UPDATE</em>: Turns out the volume <code>./documents_api:/app</code> is what isn't working. Environment is docker for windows 17.09.1 running as administrator</p>
  
  <p>Here is my folder structure:</p>
  
  <pre><code>./
    .env
    docker-compose.yml
    documents_api/
      &lt;typical rails directory contents&gt;
      Dockerfile
  </code></pre>
  
  <p>.env just contains <code>RAILS_ENV=development</code></p>
  
  <p>the dockerfile contains:</p>
  
  <pre><code>FROM ruby:2.3.3
  RUN apt-get update -qq &amp;&amp; apt-get install -y build-essential libpq-dev nodejs
  RUN mkdir /app
  WORKDIR /app
  ADD Gemfile /app/Gemfile
  ADD Gemfile.lock /app/Gemfile.lock
  RUN bundle install
  ADD . /app
  </code></pre>
  
  <p>docker-compose.yml contains:</p>
  
  <pre><code>version: '3'
  services:
    database:
      image: mongo
      volumes:
        - mongo:/var/lib/mongo
      env_file:
        - .env
      ports:
        - "27017:27017"
  
    documents:
      build: ./documents_api
      command: bundle exec rails s -p 3000 -b '0.0.0.0'
      volumes:
        - ./documents_api:/app
      env_file:
        - .env
      expose:
        - "3000"
      depends_on:
        - database
  
    frontend:
      image: nginx
      build: ./web
      depends_on:
        - documents
      ports:
        - "80:80"
        - "144:144"
  
  # Persistence
  volumes:
    mongo:
  </code></pre>