xpra icon
Bug tracker and wiki

Changes between Version 2 and Version 3 of Usage/Docker


Ignore:
Timestamp:
08/30/14 11:09:42 (6 years ago)
Author:
Antoine Martin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Usage/Docker

    v2 v3  
    1717== Resources ==
    1818
    19 * [http://docker.io/]
    20 * [https://github.com/rogaha/docker-desktop] is a working showcase for combining docker and Xpra for the desktop
    21 * Subuser [https://github.com/subuser-security/subuser] tries to wrap the solution to make it more easily accessible
     19* [http://docker.io/ Docker]
     20* [https://github.com/rogaha/docker-desktop] is a working showcase for combining docker and Xpra for the desktop - using Xephyr to forward a whole desktop, which is a little odd since one of the major benefits of xpra is rootless applications (the version numbers they refer to are confusing too)
     21* [https://github.com/subuser-security/subuser Subuser] tries to wrap the solution to make it more easily accessible - but nothing about xpra there...
     22}}}
     23
     24{{{#!div class="box"
     25== Setup ==
     26
     27Xpra needs to connect to the xpra server running inside the docker container.
     28Your options are:
     29* using a TCP socket or running an SSH server in the container - neither are very practical
     30* sharing the xpra socket directory between the host and the container. To do this you have multiple options:
     31 * bind mount the {{{.xpra}}} directory
     32 * use the {{{socket-dir}}} option at either end to point to the same location
     33 * you could also create symlinks to individual sockets, but this can get messy very quickly
     34
     35In order to be able to use {{{mmap}}} acceleration, the server expects to find the mmap file in the exact same path that the client used to create it. So you must ensure that the path to the mmap file (by default found in {{{$TMPDIR}}}) is the same on the host and in the container. (again, bind mounting a directory solves this problem)
    2236}}}
    2337
     
    2640== Notes ==
    2741* Be careful not to compromise your system security by enhancing an application's separation [https://github.com/subuser-security/subuser/issues/131]
    28 * Reportedly, Docker+Xpra can be made to work with local connections. By mounting a host's directory as the containers ~/.xpra directory, the connection socket file is exposed to the host. Symlinking from the host's ~/.xpra/HostsHostname-DisplayNumber makes the clients session available transparently to the host.
    29 * Also, reportedly, this even works with a mmap file (dramatically improving performance). The Xpra protocol dictates that the mmap file's path is sent from the client to the server. The client creates this file in the system's tmp directory, which can be overridden with the TMPDIR environment variable. Mounting a host's path at the right location in the docker volume enables the Xpra server to find it.
    3042}}}