docker build出现交互式时区设置解决

当我们基于ubuntu镜像构建Docker的时候,偶尔会出现 please select the geographic area in which you live. 让我们选择时区

原因是ubuntu 18.04后没有默认的系统时区,安装tzdata会出现交互式时区设置

解决方案

Dockerfile 开头加上

1
2
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
Author

Akkuman

Posted on

2021-03-03

Updated on

2021-04-16

Licensed under

Comments