Docker

[Docker] DEBIAN_FRONTEND=noninteractive

thxxyj 2023. 3. 26. 11:09
728x90

Dockerfile을 통해 패키지 설치할 때 아래와 같이 interactive 입력을 받지 않으려면

DEBIAN_FRONTEND=noninteractive 를 추가하면 된다.

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  2. America  3. Antarctica  4. Australia  5. Arctic  6. Asia  7. Atlantic  8. Europe  9. Indian  10. Pacific  11. SystemV  12. US  13. Etc
Geographic area: 6

Current default time zone: 'Asia/Seoul'

 

 

yum을 사용할 때 아래와 같은 interative 입력을 받지 않으려면, apt-get install -y 옵션을 추가한다.

0 upgraded, 17 newly installed, 0 to remove and 1 not upgraded.
Need to get 8587 kB of archives.
After this operation, 38.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

 

ex)

FROM ubuntu:18.04
RUN apt-get update apt-get install -y sudo vim \
(....)
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gawk wget \

# 또는
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update apt-get install -y sudo vim \
728x90