【发布时间】:2021-06-15 14:19:21
【问题描述】:
一个。在终端中运行以下导出命令:
export DOCKER_CONTENT_TRUST=1
b.运行:
docker-compose up --build -d
失败:
ERRO[0000] Can't close tar writer: io: read/write on closed pipe
error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.41/build?buildargs=%7B%22EIS_VERSION%22%3A%222.4%22%2C%22GO_VERSION%22%3A%221.12%22%2C%22HOST_TIME_ZONE%22%3A%22Asia%2FKolkata%22%2C%22HTTPS_PROXY%22%3A%22http%3A%2F%2Fproxy-xyz.com%3A911%22%2C%22HTTP_PROXY%22%3A%22http%3A%2F%2Fproxy-xyz.com%3A911%22%2C%22NO_PROXY%22%3A%22127.0.0.1%2Clocalhost%22%2C%22UBUNTU_IMAGE_VERSION%22%3A%2218.04%22%2C%22http_proxy%22%3A%22http%3A%2F%2Fproxy-xyz.com%3A911%22%2C%22https_proxy%22%3A%22http%3A%2F%2Fproxy-xyz.com%3A911%22%2C%22no_proxy%22%3A%22127.0.0.1%2Clocalhost%22%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=dockerfiles%2FDockerfile.eisbase&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=ia_eisbase%3A2.4&target=&ulimits=null&version=1: invalid reference format
Sending build context to Docker daemon 12.55kB
我认为 DOCKER_CONTENT_TRUST 锁定了一些文件 wrt 导致此错误的 docker。
【问题讨论】:
-
这看起来像是构建错误,特别是构建中的图像名称。请包含 Dockerfile 并编写会导致此错误的 yaml。详情请见minimal reproducible example。
-
基于OP,调用的构建URL是
http:///var/run/docker.sock/v1.41/build,这里是构建参数:gist.github.com/Sryther/fa7dcd0a2775c8a55221965d69503847
标签: bash docker shell docker-compose