gpt4 book ai didi

swift - tzdata 卡住 docker 构建 Swfit 图像

转载 作者:行者123 更新时间:2023-12-05 05:09:21 29 4
gpt4 key购买 nike

当运行 docker build 构建 swift 镜像时,tzdata 将停止该过程。提示选择位置,但输入号码后没有反应。

Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area:

我的 Dockefile 是:

FROM ubuntu:18.04
LABEL maintainer="Swift Infrastructure <swift-infrastructure@swift.org>"
LABEL Description="Docker Container for the Swift programming language"

RUN apt-get update && apt-get upgrade -y && \
apt-get install -y \
git \
curl \
cmake \
wget \
ninja-build \
clang \
python \
uuid-dev \
libicu-dev \
icu-devtools \
libbsd-dev \
libedit-dev \
libxml2-dev \
libsqlite3-dev \
swig \
libpython-dev \
libncurses5-dev \
pkg-config \
libblocksruntime-dev \
libcurl4-openssl-dev \
systemtap-sdt-dev \
tzdata \
rsync && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Vapor setup
RUN /bin/bash -c "$(wget -qO- https://apt.vapor.sh)"

# Install vapor and clean
RUN apt-get install swift vapor -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN vapor --help

在我重置Docker之前它是正常工作的。我的错误在哪里?

最佳答案

通过将 ARG DEBIAN_FRONTEND=noninteractive 添加到 Dockerfile 来防止 tzdata 询问。

关于swift - tzdata 卡住 docker 构建 Swfit 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57630388/

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