环境描述:

 

Dokcerfile

错误:

 

 解决方案一:

Build images with BuildKit | Docker DocumentationLearn the new features of Docker Build with BuildKithttps://docs.docker.com/develop/develop-images/build_enhancements/#to-enable-buildkit-builds解决方案二:

linux:

export DOCKER_BUILDKIT=1 # or configure in daemon.json
export COMPOSE_DOCKER_CLI_BUILD=1

windows :

setx DOCKER_BUILDKIT 1 # or configure in daemon.json
setx COMPOSE_DOCKER_CLI_BUILD 1

参考链接:

How do you enable BuildKit with docker-compose? - Stack Overflowhttps://stackoverflow.com/questions/58592259/how-do-you-enable-buildkit-with-docker-compose

Logo

更多推荐