Issue
I have a docker file that installs all the dependencies and creates an environment for the application, but there is one particular one that is giving me a hard time.
I am using this command to install tkinter in docker container
RUN apt-get install -y python3-tk
But this one gives a prompt to select for time zones and geography.
I am currently circumventing this by getting in the docker and install the same in container with
docker run -ti tag:latest /bin/sh
which isn't very neat, is there a way around this one, Either to do one of the following
- Auto select the prompt (with something like expect and send)
- Install tkinter without prompt maybe defaults.
Any suggestions that are not complete answers for similar problems are appreciated as well, we can also install it in a different way if possible without apt
Solution
I had the same problem, and I used this in my Dockerfile
:
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London
RUN apt-get install -y python3-tk
This is based on this answer: How to install tzdata on a ubuntu docker image?
Answered By - endavid Answer Checked By - David Marino (WPSolving Volunteer)