Execute the following to run the container
docker run -ti --rm \ -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v ~/.Xauthority:/home/developer/.Xauthority \ przerull/android-studio
In this blog post, Fabio Rehm shows how to run GUI apps with docker by sharing the .x11-unix file and .Xauthority files as volumes.
I always felt that android studio mucked up my system (although much less than eclipse did) and so I thought I'd dockerize it. I was very pleasantly surprised by how straight forward it was.