title: 'Dockerizing' Python Tkinter GUI: doesn't display anything but runs fine
body: <p>First day trying to 'Dockerize' my Python GUI made in Tkinter for the purpose of having it as a standalone application and nothing is displayed despite using a recommended command to do so: <code>run -it -e DISPLAY=$DISPLAY background-revolution</code> (with it supposedly being interactive mode and -e to set the display as the user's own) Here is the Dockerfile:</p>
  <pre><code>FROM python:3.9
  
  ADD main.py . 
  
  RUN pip install pillow 
  
  CMD [&quot;python&quot;, &quot;./main.py&quot;] 
  </code></pre>
  <p>The output it gives me is a test print statement I wrote that says &quot;docker working&quot; but none of the actual GUI (which works fine from running it normally). To build the Docker image this is what I ran: <code>docker build -t background-revolution .</code></p>
  <pre><code>[+] Building 10.5s (9/9) FINISHED
   =&gt; [internal] load build definition from Dockerfile                                                                                                                                                                        0.2s 
   =&gt; =&gt; transferring dockerfile: 133B                                                                                                                                                                                        0.0s 
   =&gt; [internal] load .dockerignore                                                                                                                                                                                           0.2s 
   =&gt; =&gt; transferring context: 2B                                                                                                                                                                                             0.0s 
   =&gt; [internal] load metadata for docker.io/library/python:3.9                                                                                                                                                               0.9s 
   =&gt; [auth] library/python:pull token for registry-1.docker.io                                                                                                                                                               0.0s 
   =&gt; CACHED [1/3] FROM docker.io/library/python:3.9@sha256:acb4e43d0c66c168e72ceaba5913cde472e4a17017cec9346969c9725a1fea94                                                                                                  0.0s 
   =&gt; [internal] load build context                                                                                                                                                                                           0.1s 
   =&gt; =&gt; transferring context: 12.01kB                                                                                                                                                                                        0.0s 
   =&gt; [2/3] ADD main.py .                                                                                                                                                                                                     0.5s 
   =&gt; [3/3] RUN pip install pillow                                                                                                                                                                                            6.9s 
   =&gt; exporting to image                                                                                                                                                                                                      1.5s 
   =&gt; =&gt; exporting layers                                                                                                                                                                                                     1.2s 
   =&gt; =&gt; writing image sha256:95e56740a3427899906e9c6522198f5d749fd13870450b046a2bd874b3a04548                                                                                                                                0.0s 
   =&gt; =&gt; naming to docker.io/library/background-revolution         
  </code></pre>