4

I'm setting up a dockerfile and one of the included packages should be "python3-tk". However, while building the image, the package asks for a location (???), where you need to specify a value from 1 to 8, depending on your continent (why??) and then timezone.

I tried like this:

RUN apt-get update \
    && apt-get install -y \
        python3-tk \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

No luck, it still asks. When I comment out this code in the dockerfile the image builds fine, so it's definitely this package that is asking for input.

What can I do in this case?

EDIT: This is where it gets stuck:

 => => # 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: 

1 Answers1

7

You need to set the timezone in the docker file before "apt". This is a method:

RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone

What also stops questions is (also set in the beginning of a docker file):

ARG DEBIAN_FRONTEND=noninteractive
Rinzwind
  • 299,756