Inder
Inder

Reputation: 3816

Tkinter install in docker

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

  1. Auto select the prompt (with something like expect and send)
  2. 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

Upvotes: 4

Views: 5199

Answers (1)

endavid
endavid

Reputation: 1943

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?

Upvotes: 6

Related Questions