1. 程式人生 > >docker ubuntu 不選時區

docker ubuntu 不選時區

color expose cmd res The 配置環境變量 暴露 掛載 ase

在用ubuntu:18.04基本鏡像進行構建的時候。出現啦選擇時區的地方,然後會卡住。

FROM ubuntu:18.04
#env 環境變量
ENV AUTHOR="xianyunyehe" PWD="." 
#復制源
COPY ${PWD}/sources.list /etc/apt/sources.list
#容器啟動執行的腳本程序
#CMD [ "" ]
#定義掛載的卷
VOLUME [ "/tmp" ]
#對外暴露的端口
EXPOSE 8080
#工作目錄 構建的每層操作都在該目錄下進行
WORKDIR /tmp
#指定用戶
USER root

# 當以當前鏡像為基礎鏡像,去構建下一級鏡像的時候才會被執行
#
#RUN mkdir 
/app #WORKDIR /app #ONBUILD COPY ./package.json /app #ONBUILD RUN [ "npm", "install" ] #執行命令 RUN buildDeps=gcc libc6-dev make && apt-get update && apt-get install -y $buildDeps && apt-get install -y php && apt-get purge -y --auto-remove $buildDeps
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:

可以通過配置環境變量,來跳過這個步驟

ENV DEBIAN_FRONTEND=noninteractive

docker ubuntu 不選時區