【发布时间】:2021-09-28 10:29:33
【问题描述】:
编辑:我想通了:我在没有运行命令的情况下构建了容器,并且似乎它已将 miniconda 下载为带有空格的“Miniconda.sh”-.- 所以我的所有其他命令都丢失了。谢谢!
这是我的 Dockerfile。
#
# Building a docker image with the latest ubuntu version and basic python install
#
# latest ubuntu version
FROM ubuntu:latest
# information about maintainer
MAINTAINER yves
# add the bash script
ADD install.sh /
# change rights for the script
RUN chmod u+x /install.sh
# run the bash script
RUN /install.sh
# prepend the new path
ENV PATH /root/miniconda3/bin:$PATH
# execute IPython when container is run
CMD ["ipython"]
当我构建时
docker build -t pyalgo:basic .
但是,它在日志中显示并非每个命令都在执行。
日志中只执行了四个命令:
=> CACHED [1/4] FROM docker.io/library/ubuntu:latest 0.0s
=> [2/4] ADD install.sh / 0.0s
=> [3/4] RUN chmod u+x /install.sh 0.3s
=> [4/4] RUN /install.sh
我试图找出为什么会发生这种情况,但我不明白。它似乎正在查找文件和所有内容。
编辑:我尝试使用以下关于 --progress 的建议,但它似乎仍然只使用 4 个命令: enter image description here
【问题讨论】:
-
@GinoMempin 我尝试显示更多输出,但这似乎不是输出问题,因为使用 --progress=plain 仍然只显示 4 个命令
-
您是否希望
MAINTAINER和最后一个CMD也会显示?
标签: docker docker-build