mac构建Docker镜像报错failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpec

B-D3T8MD6R-1911:nginxbuild zhuxuemin$ docker build -f Dockerfile -t centos7-nginx:v1 .
[+] Building 0.2s (3/3) FINISHED                                                                                                                                                                                   
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 340B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                               0.0s
 => ERROR [internal] load metadata for docker.io/library/centos:centos7                                                                                                                                       0.1s
------
 > [internal] load metadata for docker.io/library/centos:centos7:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code [manifests centos7]: 403 Forbidden

查阅资料增加两行

export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0

参考资料链接

你可能感兴趣的:(macos,docker,容器)