(spotify:1): Gtk-WARNING **: cannot open display: unix

I try to run the spotify docker container. I have docker 1.11.2 installed on Ubuntu 14.04 VM.
I’m on MAC and I’m using SSH to connect with my VM.
It’s working fine but when I try to run the docker container I get an error:

ubuntu@ubuntu-virtual-machine:~$ docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY -v /dev/snd:/dev/snd --privileged --name spotify jess/spotify

(spotify:1): Gtk-WARNING **: cannot open display: unix

How can I fix this? I tried already some things I read on the internet like:
edit ~/.xinitrc and put the following in it:

  • Where are the source files for my Docker application deployed to ECS?
  • Docker compose: ensure volume mounted before running CMD
  • Powershell remote access to nanoserver on docker
  • OSI Layer Model for Docker?
  • How to see the log information in running docker daemon?
  • Launch Docker containers to handle HTTP requests
  • #! /bin/bash
    xhost +localhost &
    

    Also tried to ssh to my ubuntu in the following way:
    ssh ubuntu@IP -X and

    ssh ubuntu@IP -Y
    

  • How to monitor docker containers log from non-root user?
  • Bad log time in Docker
  • docker dnsmasq wildcard sub domains not supported?
  • How to mount the volume of host to docker container with executable file permission using docker api
  • Fitnesse error when used with spotify maven plugin and docker
  • Requested JSON data encrypted arbitrarily depending on host
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.