最佳答案
来自我的Dockerfile
的片段:
FROM node:12.18.0
RUN echo "hello world"
RUN psql --version
当我运行docker build .
时,我看不到这两个命令的任何输出,即使它们没有被缓存。文档说docker build
默认是verbose的。为什么我没有看到命令的输出?我以前见过他们。
构建时的输出:
=> [7/18] RUN echo "hello world" 0.9s
我在建筑完成后看到的输出:
=> CACHED [6/18] RUN apt-get install postgresql -y 0.0s
=> [7/18] RUN echo "hello world" 6.4s
=> [8/18] RUN psql --version 17.1s
Dockerfile
是从基于Debian 9的node:12.18.0创建的。
Docker版本19.03.13,build 4484c46d9d。