title: Error processing tar file (exit status 1): unexpected EOF when building with docker-compose while data directory exists
body: <p>My <code>docker-compose.yml</code> looks like this:</p>
  
  <pre><code>version: '3'
  services:
    phab:
      build:
        context: .
        args:
          - PHAB_BASE_URI=https://phab.example.com
          - PHAB_REPO_PATH=/var/repo
          - PHAB_TIMEZONE=Europe/Berlin
          - PHP_POST_MAX_SIZE=32MB
      ports:
        - "127.0.0.1:8012:80"
      volumes:
        - ./.data/repos:/var/repo
        - ./.data/mysql:/var/lib/mysql/
  </code></pre>
  
  <p>If I try to rebuild after I started the container, I get</p>
  
  <pre><code>$ docker-compose build
  Building phab
  ERROR: Error processing tar file(exit status 1): unexpected EOF
  </code></pre>
  
  <p>This appears to be due to the <code>.data</code> directory. The only "cure" I found was either deleting the directory or moving it <em>outside</em> of the project directory. Renaming the directory to eg. <code>.data1</code> does <strong>not</strong> fix it.</p>
  
  <pre><code>$ sudo mv .data .data1
  $ docker-compose build
  Building phab
  ERROR: Error processing tar file(exit status 1): unexpected EOF
  $ sudo mv .data1 ..
  $ docker-compose build
  Building phab
  Step 1/27 : FROM tutum/lamp:latest
  ---&gt; 3d49e175ec00
  Step 2/27 : RUN apt-get update &amp;&amp; apt-get install -y php5-curl php5-mysqlnd php5-gd python3-pygments
  ---&gt; Using cache
  [ ... ]
  </code></pre>
  
  <p>I am using docker-compose 1.18.0, build 8dd22a9 abd Docker 18.06.0-ce, build 0ffa825 on Debian 9.5.</p>
  
  <hr>
  
  <p>I have seen the question <a href="https://stackoverflow.com/questions/42784396/docker-error-error-processing-tar-fileexit-status-1-unexpected-eof">Docker ERROR: Error processing tar file(exit status 1): unexpected EOF</a>. However just flushing the <code>/var/lib/docker</code> directory does not appear as an option to me. Pruning unused images and even removing the base image before the build does not fix the issue.</p>