Score:4

Is there anything I can do to ignore any questions during apt-get install ? -y doesn't work for "python3-tk"

eg flag

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: 
cn flag
What they included antartica? and what is the 8th? :D How many people use python there? :D Most of these you should be able to set as a variable. Can you put the actual question it asks into te question?
Николай Дянков avatar
eg flag
@Rinzwind I updated my question, there is antarctica :P
cn flag
oh this is TZDATA . 1 sec
Score:6
cn flag

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
Николай Дянков avatar
eg flag
Worked, thank you. Just a front-ender messing with things that he shouldn't. How are you even supposed to know this stuff lol.
cn flag
experience and the rest duckduckgo ;-)
Raffa avatar
jp flag
I would say still experienced "duckduckgoing" :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.