我不能运行docker-compose up
或docker-compose build --no-cache
。两者都以ERROR: Error processing tar file(archive/tar: invalid tar header)
退出。
我之前运行了以下命令导致了这种情况:
要停止并删除容器:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
删除所有图像:
docker rmi $(docker images -q)
我已经尝试过以下方法:
docker-compose ps
不列出任何容器或镜像。docker ps -a
也没有列出任何容器。docker image list
没有列出任何镜像。
我正在以调试模式运行 dockerd
,并看到:
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
看起来我已经把docker弄到了一个奇怪的状态,而且无法恢复到正常状态。
我尝试过运行docker-compose down
但是没有任何帮助。
Docker版本:
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版本:docker-compose版本1.12.0,构建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
docker version
的完整输出。您的构建目录有多大(目录及其子目录中所有文件的大小)? - BMitch