Repository navigation
tkinter doesn't work on slim-buster Python images #484
Copy link
Copy link
Closed
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image
Description
Activity
In order to keep the
slimimages actually slim the library is not kept on purpose. See #122 (comment).python/Dockerfile-slim.template
Lines 109 to 116 in 3ebdcfd
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { print $(NF-1) }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ | sort -u \ | xargs -r apt-mark manual \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ You should be able to just install the
tkpackage from apt, but it has quite a few dependencies:docker run -it --rm python:3.8-slim-buster bash root@419462f4cf20:/# apt-get update Get:1 http://deb.debian.org/debian buster InRelease [121 kB] Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB] Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [198 kB] Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7905 kB] Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B] Fetched 8347 kB in 1s (8615 kB/s) Reading package lists... Done root@419462f4cf20:/# apt-get install tk Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: fontconfig-config fonts-dejavu-core libbsd0 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libfontconfig1 libfontenc1 libfreetype6 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 libllvm7 libpciaccess0 libpng16-16 libsensors-config libsensors5 libsm6 libtcl8.6 libtk8.6 libutempter0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcb1 libxcomposite1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6 libxinerama1 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxss1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 lsb-base sensible-utils tcl tcl8.6 tk8.6 ucf x11-common x11-utils xbitmaps xterm Suggested packages: pciutils lm-sensors tcl-tclreadline mesa-utils xfonts-cyrillic The following NEW packages will be installed: fontconfig-config fonts-dejavu-core libbsd0 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libfontconfig1 libfontenc1 libfreetype6 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 libllvm7 libpciaccess0 libpng16-16 libsensors-config libsensors5 libsm6 libtcl8.6 libtk8.6 libutempter0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcb1 libxcomposite1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6 libxinerama1 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxss1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 lsb-base sensible-utils tcl tcl8.6 tk tk8.6 ucf x11-common x11-utils xbitmaps xterm 0 upgraded, 73 newly installed, 0 to remove and 6 not upgraded. Need to get 29.7 MB of archives. After this operation, 238 MB of additional disk space will be used. Do you want to continue? [Y/n] ^C
- addedquestionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image
on May 15, 2020 @yosifkit Did you successfully build the image though? Because after the 'Do you want to continue? [Y/n]' mine just aborted. I am not sure how to circumvent the prompt.
Add
-yto theapt-get installcommand.
Metadata
Metadata
Assignees
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image
tkinter doesn't work on slim-buster images -