美文网首页
"--platform" is only supported o

"--platform" is only supported o

作者: cherishpf | 来源:发表于2022-03-25 09:43 被阅读0次

    执行构建镜像命令
    docker build -t registry.cn-shanghai.aliyuncs.com/task:3.2.2022032501 --rm --platform=linux/amd64,linux/x86_64

    1. 报错:
      "--platform" is only supported on a Docker daemon with experimental features enabled

    解决方法:
    由于我是在Windows上安装的docker,打开Dashboard,修改"experimental": false为"experimental": true
    {
    "registry-mirrors": [],
    "insecure-registries": [],
    "debug": true,
    "experimental": true
    }

    image.png
    【linux中参考】https://superuser.com/questions/1247768/how-to-test-experimental-features-in-docker-17-06-2-ce
    1. 报错:
      Error response from daemon: "amd64,linux" is an invalid component of "linux/amd64,linux/x86_64": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument
      解决方法:
      修改命令为docker build -t registry.cn-shanghai.aliyuncs.com/task:3.2.2022032501 --rm --platform=linux/x86_64
      成功!

    相关文章

      网友评论

          本文标题:"--platform" is only supported o

          本文链接:https://www.haomeiwen.com/subject/gemrjrtx.html