While experimenting with docker, I realized I can run a browser in a container for improved security. I managed to start with a clean Docker Fedora, in which I installed the
openssh-daemon package. From there I built a new image in which I installed
I was eventually able to start a graphical Firefox from the host computer, with the following command line:
ssh -p2222 localhost -X firefox
So far so good, but two very related weird things happen here:
If I launch firefox from my real machine, and then I start it from the container, I get a second window configured as in my real machine;
The exact opposite, that is, if I start Firefox from the container, and then I start another one from my real machine, a second window as in the container appears.
I was surprised to say the least. The contaner is suposed to isolate completely the process, is it not?
EDIT: I believe I found a related question. The
--no-remote option fixes the problem. Still I don't understand how this could happen. I guess this has something to do with the XWindow protocol, since I don't see any other connection between the two instances.