title: is $DISPLAY set properly? - Running a wxPython Phoenix GUI in a docker container
body: <p>I would like to dockerize a GUI written with wxPython Phoenix in order to have the GUI appear on the host when running the docker image.</p>
  
  <p>Below is a basic wxPython Phoenix GUI and the Dockerfile that creates an image with <code>Ubuntu 18.04</code>, <code>Python 3.7.5</code> and <code>wxPython Phoenix</code>.</p>
  
  <p>When running the image, it returns the following message:</p>
  
  <pre><code>docker build -t simple-gui:latest .
  docker run -it simple-gui /bin/bash
  root@97229a17f2cd:~/python# ./simple_gui.py
  Unable to access the X Display, is $DISPLAY set properly?
  </code></pre>
  
  <p>I understand I have to send the address of the host's X server to the docker image that would then be used by wxPython Phoenix, but I'm not sure how to do that.</p>
  
  <p>simple-gui.py: (from <a href="https://wiki.wxpython.org/Getting%20Started#A_First_Application:_.22Hello.2C_World.22" rel="nofollow noreferrer">wxPython Phoenix wiki</a>)</p>
  
  <pre class="lang-py prettyprint-override"><code>#!/usr/bin/env python3.7
  
  import wx
  
  app = wx.App(False)
  frame = wx.Frame(None, wx.ID_ANY, "Hello World")
  frame.Show(True)
  app.MainLoop()
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM ubuntu:18.04
  
  # Install dependencies for Python and wxPython Phoenix
  RUN apt update &amp;&amp; apt install -y \
      libwebkitgtk-3.0-dev \
      libgtk-3-dev \
      libsm-dev \
      freeglut3 \
      freeglut3-dev \
      libnotify-dev \
      libgstreamer1.0-dev \
      libgstreamer-plugins-base1.0-dev \
      dpkg-dev \
      build-essential \
      python3.7-dev \
      libjpeg-dev \
      libtiff-dev \
      libsdl1.2-dev \
      software-properties-common \
  # Install Python 3.7 and pip latest versions
      &amp;&amp; add-apt-repository ppa:deadsnakes/ppa \
      &amp;&amp; apt install -y python3.7 python3-pip \
      &amp;&amp; python3.7 -m pip install -U --no-cache-dir pip \
  # Install wx
      &amp;&amp; python3.7 -m pip install -U --no-cache-dir -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython
  
  # Copy files
  COPY simple_gui.py /root/python/
  WORKDIR /root/python
  ENTRYPOINT ["./simple_gui.py"]
  </code></pre>