4 ms·
Wait. You can mount a socket as a volume? Why didn't I think of that?! Sometimes I just love Unix.
by nl 12y ago
Wait. You can mount a socket as a volume? Why didn't I think of that?!
Sometimes I just love Unix.
- vidarh 12y agoYou can. The biggest caveat with isolating X clients in Docker is that you lose extensions like mit-shm (the shared memory extension), that badly affects performance compared to running apps locally. If you're used to running X apps over the network, then that's not such a big deal, though.
- riskable 12y agoYou can work around this problem by running X11 in the parent of the container and performing all your SHM (and similar) operations there. Essentially, coordination of such things needs to happen where the X11 server is running and not inside the container. This is how Gate One's (soon to be released) X11 feature currently works to isolate each user's X11 server. There exists mechanisms to share memory between containers as well but I personally haven't tried them.
- vidarh 12y agoThat works for compatibility (for apps that fails to work properly without MIT-SHM support), but does nothing for the performance degradation.
- justincormack 12y agoOriginally bind mounts were only for directories, but support for files and hence named sockets was added later.