【发布时间】:2022-01-15 06:49:20
【问题描述】:
我有 2 个 dockerfile:
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y \
software-properties-common \
python3
FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get update && apt-get install -y \
python3
问题是:当我运行第一个(使用docker build)时,构建过程会挂起:
software-properties-common 包询问我地理区域 - 我无法提供任何输入,我想在构建图像时不允许这样做。
但是,当我构建第二个 dockerfile 时,并没有出现这个问题。我很好奇 - 为什么会这样?
【问题讨论】:
标签: docker dockerfile