docker-compose up "ERROR: Error processing tar file(archive/tar: invalid tar header)
21:07 14 May 2017

I am unable to run docker-compose up or docker-compose build --no-cache. Both exit with ERROR: Error processing tar file(archive/tar: invalid tar header).

I got myself into this situation by running

To stop and remove the containers:

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

To delete all the images:

docker rmi $(docker images -q)

I've tried the following:

  • docker-compose ps doesn't list any containers or images.

  • docker ps -a doesn't list any containers either.

  • docker image list doesn't list any images.

I am running dockerd in debug mode and I'm seeing:

DEBU[0998] Calling GET /v1.22/images/codesource_buildbot/json 
ERRO[0998] Handler for GET /v1.22/images/codesource_buildbot/json returned error: No such image: codesource_buildbot

So it seems as though as I've managed to get docker into a strange state and can't get it back to a working state.

I've tried docker-compose down and that hasn't helped either.

Docker Version:

Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64
 Experimental: false

docker-compose version: docker-compose version 1.12.0, build b31ff33

docker-compose.yml

version: '2'
services:
  buildbot:
    build: ./containers/buildbot
    ports: 
      - "8010:8010"
    volumes:
      - "./containers/buildbot/volume:/code"

Dockerfile

FROM debian:latest
WORKDIR /home
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "python-dev"]
RUN ["apt-get", "install", "-y", "python-pip"]
RUN ["apt-get", "install", "-y", "git-all"]
RUN ["pip", "install", "--upgrade", "pip"]
RUN ["pip", "install", "--ignore-installed", "six"]
RUN ["pip", "install", "service_identity"]
RUN ["pip", "install", "buildbot[bundle]"]
CMD bash wait_for_master.sh
linux docker docker-compose