gpt4 book ai didi

macos - OSX Docker Build : How can I see the full build output?(--progress=plain 不是解决方案!)

转载 作者:行者123 更新时间:2023-12-04 11:49:36 42 4
gpt4 key购买 nike

我刚从工作中得到一台 MacBook,我正在用它来构建 docker 镜像。通常,docker build 会显示完整日志(即 ls -la 显示 cwd)。这至少是我在 linux 机器上习惯的。
然而,在 macbook 上,它只显示了一个简短的概述:(实际控制台输出)

 => [internal] load build definition from Dockerfile                                                                                                                                                                                          0.0s
=> => transferring dockerfile: 40B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/debian:stretch-slim 1.1s
=> [internal] load build context 0.0s
=> => transferring context: 58B 0.0s
=> [1/16] FROM docker.io/library/debian:stretch-slim@sha256:eb436e834ba416c45359aa0709febef17fdea65ab6a8f4db12016aa2fa63be0c 0.0s
=> CACHED [2/16] RUN apt-get update && apt-get upgrade -y 0.0s
=> CACHED [3/16] RUN apt-get install wget -y 0.0s
=> CACHED [4/16] RUN wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz 0.0s
=> CACHED [5/16] RUN tar -zxvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz 0.0s
=> CACHED [6/16] RUN mv mysql-5.7.22-linux-glibc2.12-x86_64 mysql-5.7.22 0.0s
=> CACHED [7/16] RUN ls -la 0.0s
=> CACHED [8/16] RUN mv mysql-5.7.22 /usr/local/ 0.0s
=> CACHED [9/16] RUN groupadd mysql 0.0s
=> CACHED [10/16] RUN useradd -r -s /sbin/nologin -g mysql mysql -d /usr/local/mysql 0.0s
=> CACHED [11/16] RUN chown -R mysql /usr/local/mysql-5.7.22/ 0.0s
=> CACHED [12/16] RUN chgrp -R mysql /usr/local/mysql-5.7.22/ 0.0s
=> CACHED [13/16] COPY my.cnf /etc/ 0.0s
=> CACHED [14/16] COPY startup.sh . 0.0s
=> CACHED [15/16] RUN ls -la 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:d93a0842352d0980be6ba4b57fdd6cad18818b7527bedecfb706e416b7fb6062 0.0s
=> => naming to docker.io/library/customsql
第 7 步和第 15 步应该向我展示结果,但这只是被省略了。 (我知道,它是缓存的结果,但是当我更改 Dockerfile 并重建图层时它没有显示出来)。
设置 --progress=plain没有任何好处。事实上,它只是将颜色从紫色变为白色(HideThePainHarold.jpg)。
任何帮助将不胜感激。

最佳答案

只需在您的 shell 中设置 export DOCKER_BUILDKIT=0 ....

关于macos - OSX Docker Build : How can I see the full build output?(--progress=plain 不是解决方案!),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65322701/

42 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com