if you are running it inside a docker container, then you need to connect your docker instance to a X11 server in you host and forward your display to docker
docker run -e DISPLAY=localhost:0
you need to install X11 server software, like XMing X server or Cygwin/X or VcXsrv or XQuartz
and make sure that X11 server is running and working