1

我想使用Docker构建图像ARG并激活它DOCKER_CONTENT_TRUSTv18.06.1-ce

Dockerfile:

ARG tag
FROM busybox:${tag}

运行docker build --build-arg tag=1.33.1 .正常

然后,激活内容信任export DOCKER_CONTENT_TRUST=1

重新运行docker build --build-arg tag=1.33.1 .NOK

收到错误:

Sending build context to Docker daemon 

error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/build?buildargs=%7B%22tag%22%3A%221.33.1%22%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&target=&ulimits=null&version=1: invalid reference format

知道如何解决这个问题吗?

注意:只发生在FROM指令上

4

0 回答 0